Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts

    Applying a onmouseover link color change to a specific div

    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
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #2
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Something like this?
    PHP Code:
    <style type="text/css">
    .
    blah a:linkcolorblue; } a:hover colororange; }
    </
    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

  • #3
    Senior Coder chilipie's Avatar
    Join Date
    Jul 2004
    Location
    Shrewsbury, UK Age: 16
    Posts
    1,117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Or, if you want only the links in that <div> to be a particular colour:
    Code:
    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>

  • #4
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Blah! That's what I meant, my bad Thanks for posting the correct way chilipie.

  • #5
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    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!
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •