Styling the <body> ElementAs discussed in Lesson 18, "Creating a Site Header," to center a container on the page, you must find ways to work around browsers that don't support auto margins. The first work-around involves applying text-align: center to the <body> element as shown in Listing 19.3. The results can be seen in Figure 19.1. Figure 19.1. Screenshot of styled <body>.A background-color and color also must be set on the <body> element. You can use a background color of #BOBFC2 and a color of #444. Listing 19.3. CSS Code for Styling the Bodybody { text-align: center; background: #B0BFC2; color: #444; } |