Remove underline only from anchor element child

前端 未结 7 776
故里飘歌
故里飘歌 2020-12-10 12:02

When an a tag contains child elements, like an i tag, it\'s still applying the underline to it on hover, and I\'m wondering how to remove the under

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-10 12:38

    I faced the same problem.

    But I wanted the inner element to be Right, so setting just float: right worked fine.

    a {
        display: block;
        overflow: hidden; // Clearfix
        text-decoration: none;
    }
    a .right-none-underline-element { float: right }
    

    For your reference.

提交回复
热议问题