Creating a Page Layout with Floats

In order to create a multicolumn layout supported in all browsers, we are going to use floats. Floats are very simple at first glance but have a few unintuitive quirks to them that can cause some frustration when not completely understood. This may be because the true origination of floats wasn't for layout, it was to achieve the common magazine technique where text flows easily around an image. So in this chapter, we're going to delve into floats. We'll go over the basic usage of floats and follow that up by creating a layout with floats (and curing the headaches caused by floats in later sections)

Get Mastering CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.