Css no llena el título de toda la fila

I have in css/sass a title class that looks like this:

    display: block
    float: left
    margin: 25px 10px 25px -20px
    padding: 11px 10px
    font-size: 22px
    font-weight: bold
    letter-spacing: 5px
    color: red
    background: #5279b5
    -webkit-border-radius: 11px
    -moz-border-radius: 11px
    border-radius: 18px
    border-top-left-radius: 0
    border-bottom-left-radius: 0

The problem is, I add the title, but for example, if then I add a new form, the form starts right next to the title. I need all the title's row to be empty.

Una solución es usar <br> after the title but that's not what I want. Any other ideas?

preguntado el 28 de agosto de 12 a las 11:08

u've float:left property in it.. add clear:both also.. or remove float propiedad -

removing float property solved the problem partly. Thanks -

@Voila_Voc can you post a demo at jsfiddle.net for us to work? -

Sorry man, i can't . You can try the code yourself. Convert it to css and there it is :) . -

2 Respuestas

Trata clear: both; o y margin-bottom: 10px;

Respondido 28 ago 12, 11:08

Looks like clear: both, doesn't change anything . and the margin-bottom is already 25px . Thanks for the answer - Voila_Voc


quite float:left y agregado display: inline-block, so the background doesn't fill up all the row, only the text part.

PS: Thanks to all, I'll vote you up when I'll have enough rep.

Respondido el 05 de Septiembre de 12 a las 19:09

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.