This web site is about Cascading Style Sheets as a means to separate the presentation from the
structural markup of a web site, and it will help you answer some of those frequently asked Questions,
explains some of the Basics of CSS, gives you tips and tricks for tackling
the problems with Netscape 4, offers you a tutorial about
Positioning with CSS (CSS-P, web design
without tables). There is also a page with interesting Links.
This page uses CSS to present the content in the best possible manner. If you can see this
message, then CSS (or JavaScript) is not enabled in your browser, and the page will not appear as the
designer intended.
The classic CSS question. Variations are: How do I make different colors for links on the same page? How do I make a text rollover?
a:link {
color: #0000FF;
text-decoration: none;
background: #FFFFFF;}/*normal links in the text*/
a:visited {
color: #FF9999;
text-decoration: none;
background: #FFFFFF;}
a:hover { /*this effect is not shown in NN4.xx*/
color: #999999;
text-decoration: underline;
background: #FFFFFF;}
a:active {/*colour in NN4.xx is red*/
color: #9999CC;
text-decoration: underline;
background: #FFFFFF;}
This gives you links that are blue without being underlined in the unvisited state, after they have been
visited the colour is salmon-pink (also without underlines), the 'hover' state is medium-grey and shows the
underline, and the 'active' state - the moment when the link is actually clicked has a purple-lilac colour and
underlines. The 'hover' state are not rendered in NN4.xx, and 'active' in NN4.xx is always red.
Click HERE for an example of the link styles.
The sequence of the links is very important.
Conclusion: If you put your link styles like spaghetti, nothing bad will happen. The site will not crash. It will affect only the hover (and the active) style, and if they show up and when they show up.
Please think about 'hiding' your links. If you make your links unrecognizable as links, then you take something away from the visitor of your site. Styling is good, usability is better...
P@tty Ayers has a wonderful tutorial that explains how to style links on a web site with DreamWeaverTM, and Project VII explains with this tutorial what pseudo classes are and how they are implemented. If you want the explanation what 'link specificity, is, then you should go to Eric Meyer's http://www.meyerweb.com/eric/css/link-specificity.html.
Other topics: