What's Next?

In this chapter, you experimented with examples of setting style properties for block elements. You should now have a good understanding of the CSS block-formatting model and be comfortable with setting margins, borders, and padding for block elements. You should also know how to create your own custom block elements using the DIV element. You've also experimented with adding padding and borders around a centered inline image.

In Chapter 10, “Aligning, Floating, and Positioning,” you learn how to horizontally align block elements relative to the page, flow text and other elements around floating elements, and use absolute and relative positioning to create dynamic layouts for your HTML documents.

Get Cascading Style Sheets (CSS) by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.