In some cases, it is not immediately obvious how to perform some basic formatting tasks with CSS. This section provides pointers for a few of the most common of these situations.
Indenting text away from the left hand edge of the page can be achieved with CSS using either margin or padding properties.
This is what the clear property is useful for. In particular, clear: both is useful to turn off all floating for subsequent elements.
Another way to get nice results is to make use of other people's CSS code. For example, the Yahoo! User Interface Library (YUI)4.1provides a variety of page layouts via CSS, though there is still the learning curve of how to use YUI itself.
Paul Murrell
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 New Zealand License.