Making Elements Float

You can make elements float in a sea of text (or other elements). You can use this technique to make text wrap around images (Image and Image) or figures to create multi-column layouts and more.

Image When you float an element to a side, the content that would normally display after it flows around it instead. Here, I’ve floated the image containers (a p with class="photo") to the left in order to get the blog entry introductory text next to ...

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.