Chapter 4. Positioning Elements

ONE OF THE KEY STEPS in the adoption of Web standards has been the abandonment of tables as a means of laying out pages. Tables were never meant to be used in this way—they were intended to be used for laying out grids of data, in a similar manner to an Excel spreadsheet. However, before the development of CSS, tables were used to create a page grid into which elements could be organized into columns. This meant adding nasty presentational hacks—such as spacer GIFs, line breaks, and non-breaking spaces—into the markup to achieve the desired layout. With CSS, you can position XHTML elements with great accuracy without adding presentational elements into your markup.

With the application of CSS properties, such as ...

Get Stylin’ with CSS: A Designer’s Guide, Second Edition 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.