...

View Full Version : Applying a onmouseover link color change to a specific div



canadianjameson
02-10-2005, 09: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, 09: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, 09: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, 09:51 PM
Blah! That's what I meant, my bad:o Thanks for posting the correct way chilipie.

canadianjameson
02-11-2005, 12:16 AM
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!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum