Text-decoration: none not working

后端 未结 14 2151
花落未央
花落未央 2021-01-01 09:08

Totally baffled! I\'ve tried rewriting the text-decoration: none line several different ways. I also managed to re-size the text by targeting it but the t

相关标签:
14条回答
  • 2021-01-01 09:16

    Try placing your text-decoration: none; on your a:hover css.

    0 讨论(0)
  • 2021-01-01 09:19
    a:link{
      text-decoration: none!important;
    }
    

    => Working with me :) , good luck

    0 讨论(0)
  • 2021-01-01 09:22

    I had lots of headache when I tried to customize a WordPress theme and the text-decoration didn't help me. In my case I had to remove the box-shadow as well.

    a:hover {
        text-decoration: none;
        box-shadow: none;
    } 
    
    0 讨论(0)
  • 2021-01-01 09:25

    Add a specific class for all the links :

    html :

    <a class="class1 class2 noDecoration"> text </a>
    

    in css :

    .noDecoration {
      text-decoration: none;
    }
    
    0 讨论(0)
  • 2021-01-01 09:27

    There are no underline even I deleted 'text-decoration: none;' from your code. But I had a similar experience.

    Then I added a Code

    a{
     text-decoration: none;
    }
    

    and

    a:hover{
     text-decoration: none;
    }
    

    So, try your code with :hover.

    0 讨论(0)
  • 2021-01-01 09:29

    You have a block element (div) inside an inline element (a). This works in HTML 5, but not HTML 4. Thus also only browsers that actually support HTML 5.

    When browsers encounter invalid markup, they will try to fix it, but different browsers will do that in different ways, so the result varies. Some browsers will move the block element outside the inline element, some will ignore it.

    0 讨论(0)
提交回复
热议问题