Tuesday, July 26, 2005

The Joys of CSS

Great css day, got to create a menu strictly css based. While doing so, encounter a slight problem which after a 5 minute google search, got quickly resolved.

Did you know that you can have multiple a:link and a:visited groups. Well, I heard about it before, but never got a chance to implemented until today. It is pretty darn simple.
To setup a multiple scheme, simply put the class name in with the link part. Simple right? Better show you an example to make it crystal:

a.navlink:link {
color: #123456;
text-decoration: none;
}
a.navlink:visited {
color: #AAEEFF;
text-decoration: none;
}
a.navlink:hover {
color: #BBBB00;
text-decoration: underline;
}
a.navlink:active {
color: blue;
}


a.bodylink:link {
color: #0000ff;
font-size: 18pt;
font-weight: bold;
}
a.bodylink:visited {
color: #FFFFFF: bold;
}
a.bodylink:hover {
text-decoration: overline;
}
a.bodylink:active {
color: black;
}


Now to use it:
<a href="http://www.paralleldesigns.net" class="bodylink">Parallel Designs</a>

or

<a href="http://www.teamesprit.com/" class="navlink">Team Esprit</a>

Pretty darn simple, even I can do it! Until next time, when the next css tip comes to your town...
Digg This Del.icio.us Slashdot

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home