Treehouse: Grow your CSS skills. Land your dream job.

How to apply hover opacity w/o targeting all a hrefs on page.

  • # August 2, 2011 at 10:03 pm


    I have the follow code:

    a img:hover {
    -khtml-opacity: 0.5;
    opacity: 0.5;

    and it is applying hover opacity to my a hrefs, but the top left header logo isn’t something I want hover opacity on. Can someone help me shield this image/link from the a img: hover.

    You can see the page here:


    # August 2, 2011 at 10:06 pm

    Give it a class and set the hover opacity to full on that class (make sure it is further down the style sheet).

    # August 2, 2011 at 10:50 pm

    That worked like a charm! Thank you so much. I really appreciate you help.

    # August 2, 2011 at 11:31 pm

    No worries!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.