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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    getting a text rollover to change the imgborder color of an image (and vice versa)?

    Hi, I posted a question yesterday, and I now have a similar but more specific question.

    My site has a bunch of "badges," each of which contains an image with a text link underneath. On some of the badges, there are 2 or 3 unique text links.

    http://www.motionphi.com

    When the user rolls over the image, I would like the imgborder color to change but ALSO the text link color to change, and vice versa. Currently they both do this, but independently of one another.

    I don't want to make the entire badge a link, because in the cases where there are 2-3 links underneath the image, they need to remain unique links.

    Is this possible with my current HTML/CSS code?

    Much thanks in advance for any help.

    DS

  • #2
    Regular Coder mbaker's Avatar
    Join Date
    Jan 2010
    Location
    Burford, Oxfordshire, United Kingdom
    Posts
    249
    Thanks
    1
    Thanked 39 Times in 39 Posts
    Before making suggestions on how to achieve what you want, I'd need to be really clear on what it is that you want.

    You say:
    When the user rolls over the image, I would like the imgborder color to change but ALSO the text link color to change, and vice versa.
    But then you go on to say:
    ... cases where there are 2-3 links underneath the image ...
    I assume that by vice versa you mean when the user rolls over the link you would like the imgborder color to change as well as the link color.

    However how does this work when there are 2-3 links underneath the image? When the user rolls over the image, the colour of which link should change?

    On second thoughts, if the image is linked to one URL and the caption under the image is linked to a different URL, or there are links to several different URLs under the image, is it smart to have them both / all change colour when you hover over one? Doing so will make it look like they are the same link. This will likely cause confusion with visitors to the site who have not figured out that the site is different from any other website.
    - Michael Baker - HTML Tags Guide - Reference and Tutorials
    - Like voting, validate early, validate often - W3C HTML Validator - W3C CSS Validator
    - Wot? me cynical? no, its just if you vote, er, validate early, you have more chance of validating often.


  •  

    Posting Permissions

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