untitled

(John Hannent) #1
You accomplish most of your style definition in one location in your CSS
code, rather than having to specify multiple attributes throughout all
kinds of table elements.
Your code (markup) is much “lighter” (less verbose and complex),
making it easier to read and maintain.

Truth be told, Netscape browsers have provided more support for CSS prop-
erties like positioning and float than IE. It’s only now that IE is supporting these
properties that designing without tables has at last become practical (given
that most people use IE for their browser). CSS has been ready to make this
change from tables to table-free positioning; IE has not.


Positioning where you will ...............................................................

Tables are cumbersome and include loads of elements within elements,
so avoid resorting to them when possible. When you don’t force tables to
do jobs for which other techniques are better suited, pages load faster.
Pages have less code to send, less code for browsers to figure out, and
the code is more easily understood and modified by the designer and
programmer.


Multicolumn layouts are perhaps the most common style of organization for
Web pages, just as you find columns of text in newspapers and magazines.
The columns serve to organize the contents horizontally, just as elements
such as paragraphs, rules, and headlines help the reader see how the infor-
mation is organized vertically. The result, in most pages laid out in this kind
of grid, is essentially a table, a set of “cells” containing paragraphs or
groups of paragraphs. And for years now, nested tables were the only viable
solution to creating many kinds of Web pages.


CSS specializes in describing how things should look, including how they
should be positioned. The top, left, and positionproperties allow you to
create styles describing the various zones on your page.


Placing content willy-nilly ................................................................

Sometimes you want to break out of the more formal columnar, grid-like
layout so common in Web pages. You want to position a few paragraphs here
and there, willy-nilly — wherever your design sense tells you they look good.
In this section, I show you that approach first, before doing a more text-heavy,
column-based layout.


Chapter 12: Handling Tables and Lists (And Doing Away with Tables) 217

Free download pdf