Styling the <body> ElementNow that the layout grid and images are finished, you can begin coding the page. The first step is to force the contents of the page up against the edges of the browser window. To do this, you must set both margin and padding to 0. You can set both font-size and font-family for all elements on the page by applying these properties to the <body> element using font: 90% arial, helvetica, sans-serif;. The background-color and color properties also must be set on the <body> element. You can use a background color of #387A9B and a color of #333 as shown in Listing 21.3. The results can be seen in Figure 21.3. Listing 21.3. CSS Code for Styling the <body> Elementbody { margin: 0; padding: 0; font: 90% arial, helvetica, sans-serif; background: #387A9B; color: #333; } Figure 21.3. Screenshot of the styled <body> element. |