[Resolved] Exclude Image and Buttons from css link hover effects

Home Forums Support [Resolved] Exclude Image and Buttons from css link hover effects

Home Forums Support Exclude Image and Buttons from css link hover effects

  • This topic has 3 replies, 2 voices, and was last updated 1 month ago by Ying.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2051314
    Kelvin

    Hi,
    I’m trying to exclude link hover effects from a class button and all img objects. But couldn’t succeed.

    Here is the code I’m using.

    :root {
      --mainColor: #ff9800;
    }
    .inside-article:not(.button){}  p a{
      background:
         linear-gradient(
           to bottom, var(--mainColor) 0%,
           var(--mainColor) 100%
         );
      background-position: 0 100%;
      background-repeat: repeat-x;
      background-size: 2px 2px;
      text-decoration: none;
      transition: background-size .2s;
    }
    
    .inside-article p a:hover{
      background-size: 4px 50px;
    }

    I tried several ways described in other support chats but couldn’t succeed.

    Can you please let me know what am I doing wrong here?

    #2051340
    Ying
    Staff
    Customer Support

    Hi Kelvin,

    Try change the below CSS selector:
    .inside-article:not(.button){} p a to .inside-article p a:not(.easyazon-link):not(.gbutton)
    .inside-article p a:hover to .inside-article p a:not(.easyazon-link):not(.gbutton):hover

    #2051587
    Kelvin

    Great Ying! Thanks for the support. Problem solved!

    #2052227
    Ying
    Staff
    Customer Support

    No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.