O'Reilly logo

HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition by Bruce Hyslop, Elizabeth Castro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required