Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS A:hover – noob question!

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #267956
    cives
    Participant

    Hi guys, throughout the site i’m dev’ing I have a class that I apply to various text tags, (p,a,h1,h2,etc.), called .cal-blue.

    I want to specify that when a link with the .cal-blue class is hovered, to dim the opacity.

    I’m currently using: .cal-blue:hover{opacity: .8 !important;} which works, but also impacts the paragraph, and heading tags throughout the site when hovered.

    I’ve messed around with .cal-blue a:hover{…} or a .cal-blue:hover{…} but that doesn’t seem to do it.

    Thoughts?

    #267968
    Seriaph
    Participant

    If you are applying the class to the element like such: <a class="cal-blue">your text</a>

    Then the appropriate way to target the <a> tag in this case is a.cal-blue.

    Hope this helps.

    #268005
    cives
    Participant

    Thanks!!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.