January 2007
Beginner to intermediate
256 pages
8h 40m
English
Cascading Style Sheets gives you so many options for controlling position-related properties that it can be overwhelming when you first start. That’s especially true if you previously depended on tables for layouts. Whether it’s a paragraph, an image, or a page division, CSS positioning treats all of these elements like boxes. You saw a preview of this box model working with image padding and margins in Chapter 5. Take another look at an image from that chapter to get a better sense for how the box model works (Figure 8.1). From the middle to the outside of the box, you have: an element’s content, its surrounding padding, a border, and its margins. CSS applies that same boxes-in-boxes approach to position headers, ...