Controlling Where Elements Float

You can control which elements an element can float next to and which it cannot. To keep an element from floating next to something you don’t want it to, use the clear property Image.

Image On the previous page, you saw that the footer flowed around the floated main div. Here, you apply clear: both; to prevent that Image. You could conceivably use clear: left; instead since the only floated element you have to worry about is floating ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.