Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: Les Mackenzie on September 16, 2003, 06:50:57 PM

Title: multiple hyperlinks using .css
Post by: Les Mackenzie on September 16, 2003, 06:50:57 PM
I have a webpage using a standard layout with a navigation bar along the top and quicklinks on the side.  I want the top navigation bar to be totally white save the a:hover.

But I want the Quick Links menu to support different colours within the same .css file?


a:link    {color:#fff; background-color:transparent; font-size:7pt; font-weight:normal; text-decoration:none; font-family:verdana, arial, helvetica, sans-serif }
a:visited {color:#fff; background-color:transparent; font-size:7pt; font-weight:normal; text-decoration:none; font-family:verdana, arial, helvetica, sans-serif }
a:active  {color:#fff; background-color:transparent; font-size:7pt; font-weight:normal; text-decoration:none; font-family:verdana, arial, helvetica, sans-serif }
a:hover   {color:#FFFF00; background-color:transparent; font-size:7pt; font-weight:normal; text-decoration:none; font-family:verdana, arial, helvetica, sans-serif }



Does anyone know if it's possible and howto if it is. 
Title: Re:multiple hyperlinks using .css
Post by: Spaceman-Spiff on September 16, 2003, 07:04:18 PM
make something like:
.navigation a:link
.navigation a:hover
etc

then for your navigation, in the table/td/div tag use class="navigation" and all links (a tags) inside will be using those css above
Title: Re:multiple hyperlinks using .css
Post by: Les Mackenzie on September 16, 2003, 09:07:06 PM
Thanks a lot Spiff  :P  I thought there'd be an easy way to do it  ;D
Title: Re:multiple hyperlinks using .css
Post by: Seph|roth on September 17, 2003, 03:57:27 AM
did that work? hmm always used this

a:link.someclass {... }
a:hover.someclass { ...}
Title: Re:multiple hyperlinks using .css
Post by: [Unknown] on September 17, 2003, 09:57:44 AM
I always prefer a.someclass:link... it just seems to make sense... element.class:psuedo-class..

-[Unknown]