View Full Version : Applying a onmouseover link color change to a specific div
canadianjameson
02-10-2005, 08:20 PM
I have a <div> on my page which contains a lot of links.
whats the code to have the onmouseover link color change to another one (blue to... i dunno, orange lets say)? and what do i do to only apply it to this div?
i know this is an easy question
Brandoe85
02-10-2005, 08:37 PM
Something like this?
<style type="text/css">
.blah a:link{ color: blue; } a:hover { color: orange; }
</style>
.....
<a href="#" class="blah">Your Link</a>
<a href="#" class="blah">Your Link</a>
<a href="#" class="blah">Your Link</a>
<a href="#" class="blah">Your Link</a>
chilipie
02-10-2005, 08:42 PM
Or, if you want only the links in that <div> to be a particular colour:
CSS:
#links a {
color: blue;
}
#links a:hover {
color: orange;
}
HTML:
<div id="links">
<a href="#">Link</a>
<a href="#">Link</a>
<a href="#">Link</a>
</div>
Brandoe85
02-10-2005, 08:51 PM
Blah! That's what I meant, my bad:o Thanks for posting the correct way chilipie.
canadianjameson
02-10-2005, 11:16 PM
Thanks guys. i think i might take this in another direction and try using a fade-in script with the underline... but this helped me get to that idea, so muchas gracias!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.