Break line (clearfix)

0

I would like to know what forms you use when you need an element to occupy the total WIDTH + HEIGHT that it is using, for example:

<p>
    <span>Teste</span>
</p>

In order for P to occupy the total size you are using, I usually use a class called cb , with the following properties:

.cb {
    clear: both;
    overflow: hidden;
}

or clearfix itself, though, I always wonder if there is a more organized way to do it.

    
asked by anonymous 03.09.2014 / 14:19

1 answer

1

You can do with float or with display: inline-block , or inline-table and if not floating to use display: block .

    
29.09.2014 / 20:42