Styling the a Element


Styling the <a> Element

Hyperlinks have no real value on a printed page. To make links appear the same as all other content, you could set the color to #000 and then turn off underlines with text-decoration: none; as shown in Listing 20.13. The final result can be seen in Figure 20.5.

Listing 20.13. CSS Code for Styling the <a> Element
 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; } a {     color: #000;     text-decoration: none; } 

Figure 20.5. Screenshot of styled <a> element.





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