Styling the content Column


Styling the #content Column

The first column must be floated and set with a width of 44%. It also should be given some margin using margin: 1em 3%; as shown in Listing 21.8. The results can be seen in Figure 21.8. This will provide 1em of space above the container and 3% margin on either side, as a gutter between other columns.

Listing 21.8. CSS Code for Styling the #content Column
 body {     margin: 0;     padding: 0;     font: 90% arial, helvetica, sans-serif;     background: #387A9B;     color: #333; } h1 {     background: #D36832;     color: #FFF;     margin: 0;     padding: .5em 3%;     border-bottom: 5px solid #387A9B; } h2, h3 {     margin-top: 0; } #container {     background: url(back01.gif) repeat-y 50% 0; } #container2 {     background: url(back02.gif) repeat-y 80% 0; } #content {     width: 44%;     float: left;     margin: 1em 3%; } 

Figure 21.8. Screenshot of the styled #content column.





Sams Teach Yourself CSS in 10 Minutes
Sams Teach Yourself CSS in 10 Minutes
ISBN: 0672327457
EAN: 2147483647
Year: 2005
Pages: 234
Authors: Russ Weakley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net