O'Reilly logo

HTML, XHTML, and CSS: Your visual blueprint™ for designing effective Web pages by Rob Huddleston

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

Chapter 10. LAYING OUT YOUR PAGE

Lay Out Your Page Using Floated Elements

Prior to the advent of Cascading Style Sheets (CSS), the only method of creating multicolumn layouts was to use Hypertext Markup Language (HTML) tables. This resulted in bloated, mostly inaccessible code that was difficult to maintain. As an alternative, CSS introduced several properties to assist in laying out pages. One of the most commonly used is float.

Normally, XHTML block elements will be left-aligned and stacked on top of one another in the order in which they appear in the code. The float property allows you to take these elements and enables them to appear horizontally next to one another. The three possible values for float are left, right, and none, with the last ...

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