HTML and CSS Reference
margin-bottom to 10px, then you are extending the height of the element by 10 pixels. These 10 extra
pixels of height are rendered with a transparent background though.
Defining width and height
By default, HTML elements take up just the minimum space they need to render their content.
In some cases, you might want to assign them a fixed size, whether absolute or relative. The
properties you need to do this are width and height . You typically set width and height using pixels or
Here's a more interesting example of CSS settings that produce a layout like the one shown in
Figure 3-8. First start from the HTML:
Header of the page
And here's the related CSS content: