Chapter 9 Styling Sizes, Borders, and Margins
Understanding the CSS box model is crucial for getting your designs to behave as you want them to. —Craig Campbell
This chapter covers
- Understanding the CSS box model
- Setting the width and height of an element
- Adding padding around an element’s content
- Applying a border to an element
- Surrounding an element with a margin
When you learn about design, one of the first concepts that comes up is the principle of proximity: Related items should appear near one another, and unrelated items should be separated. This practice gives the design clear visual organization, which makes it easier for the reader to understand and navigate the design. The principle of proximity applies to your web page designs ...
Get Web Design Playground 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.