Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In This Chapter
Considerations When Beginning a Layout
Styling HTML5 Elements in Older Browsers
Resetting or Normalizing Default Styles
Setting the Height or Width for an Element
Setting the Margins around an Element
Adding Padding around an Element
Controlling Where Elements Float
Offsetting Elements in the Natural Flow
Positioning Elements Absolutely
Determining How to Treat Overflow
Displaying and Hiding Elements
You can create a wide variety of layouts with CSS. This chapter demonstrates how to build a common layout type: a masthead on top, two columns of content, and a footer on the bottom (on the next page). However, you can apply the CSS properties you’ll learn about to make vastly different layouts.