midorino
10-02-2005, 11:11 AM
Is there a way to define link colours more than once?
I'm trying to make a navigation bar which is separated into 4 big parts.
And I want it in four different colours...
I wonder if that's possible?
(If not, I suppose I'll have to make an image map.. which I don't like. :mad: )
Maybe a link definition for each Div layer?
flinchalot
10-02-2005, 01:46 PM
Maybe you could use classes? There's a good tutorial here (http://so-you.net/home/index.php?go=classtut). I think that's what you're looking for. :)
use different class names.
in your css area...
.testing a {color:#ff0000; background-color:#00ff00;}
.testing a:hover {color:#ff0000; background-color:#ff0000;}
.special a {color:#ff0000; background-color:#00ff00;}
.special a:hover {color:#ff0000; background-color:#ff0000;}
.whatever a {color:#ff0000; background-color:#00ff00;}
.whatever a:hover {color:#ff0000; background-color:#ff0000;}
then in your coding, surround the links into a div with the class name to access that particular set of css styles...
<div class="testing">
<a href="somepage1.html"> text one here </a>
<a href="somepage2.html"> text two here </a>
<a href="somepage3.html"> text three here </a>
<a href="somepage4.html"> text four here </a>
</div>
<div class="special">
<a href="somepage1.html"> text one here </a>
<a href="somepage2.html"> text two here </a>
<a href="somepage3.html"> text three here </a>
<a href="somepage4.html"> text four here </a>
</div>
<div class="whatever">
<a href="somepage1.html"> text one here </a>
<a href="somepage2.html"> text two here </a>
<a href="somepage3.html"> text three here </a>
<a href="somepage4.html"> text four here </a>
</div>
midorino
10-03-2005, 11:28 AM
Oh thanks, I just defined every single link. -_-
I guess I'll change my css soon.
Thanks a lot!
mandarinspyce
10-03-2005, 01:18 PM
Or instead classes (don't get me wrong, I'd go with these myself, but if you're only looking to change a couple of links, or use a color once or twice, I wouldn't bother with it).
Instead you can always change them by using this:
<a href="url.html" style="color: #000000";>URL here</a>.