Karem Karem - 3 months ago 10
CSS Question

CSS: Float, but don't have anything under

I have around 3 floating

div
s, 2 left and 1 right, then I have some other text content under the 3 floating
div
s. The text gets under the 3 floating elements, how do I do so it doesn't get under it, but should still float?

Answer

Some code would help, but with floats usually the problem is that they are not being cleared.

<div style="float: left;"></div>
<div style="float: left;"></div>
<div style="float: right;"></div>
<div style="clear: both;">
    <p>some text under the float</p>
</div>