Styling the footer Container


Styling the #footer Container

The footer can be separated from other content using border-top and margin-top properties.

The footer content also can be right-aligned using the text-align property.

To add space between the border and footer content, padding-top can be used as shown in Listing 20.12. The results can be seen in Figure 20.4.

Listing 20.12. CSS Code for Styling the #footer Container
 body {     font: 100% georgia, times, serif;     background: #fff;     color: #000; } h1 {     border-bottom: 1px solid #999;     margin-bottom: 1em; } #nav {     display: none; } #footer {     border-top: 1px solid #999;     text-align: right;     margin-top: 3em;     padding-top: 1em; } 

Figure 20.4. Screenshot of styled #footer container.





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