News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

multiple hyperlinks using .css

Started by Les Mackenzie, September 16, 2003, 06:50:57 PM

Previous topic - Next topic

Les Mackenzie

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. 
BLOGS SUCK! - HERE READ MINE

Please Note:  Arguing on the internet is like running in the Special Olympics...  Even if you win you're still retarded.

Spaceman-Spiff

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

Les Mackenzie

Thanks a lot Spiff  :P  I thought there'd be an easy way to do it  ;D
BLOGS SUCK! - HERE READ MINE

Please Note:  Arguing on the internet is like running in the Special Olympics...  Even if you win you're still retarded.

Seph|roth

did that work? hmm always used this

a:link.someclass {... }
a:hover.someclass { ...}

[Unknown]

I always prefer a.someclass:link... it just seems to make sense... element.class:psuedo-class..

-[Unknown]

Advertisement: