It's spoo again. This site rocks to every extent, I'm getting so much help. Thanks.
I have another question. I'm noticing on some sites, they have two hover types for different links. For example, a navigation bar has one hover style, and content has another hover style, and footers have their own hover style.
Previously, I had been using a:hover for my styles, but would often require me using bad colors just to get the links to work in both header, body, and footer so the viewer could see the links. What would be the attribute(s) to create multiple hover formats?
just target different areas of the page using descendant selectors.
/* this styles all links by default */ a:link,a:visited,a:focus,a:hover,a:active { color:#f0c;}
/* this only styles links in a div with an id of navbar */ div#navbar a:link,div#navbar a:visited,div#navbar a:focus,div#navbar a:hover,div#navbar a:active { color:#cf0; }
/* only styles links in an LI element */ li a:link,li a:visited,li a:focus,li a:hover,li a:active { color:#c00; }
Nesting your CSS like Nifkin illustrated is important not only for hover styles, but for your code in general. If you're not nesting the styles in your CSS file you're asking for cascade trouble.