8. Creating Layouts with CSS
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, ...
Get Microsoft Expression Web: Visual Quickstart Guide 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.