Remove Spacing between li

后端 未结 5 949
闹比i
闹比i 2021-02-08 03:12

How can I remove spacing between the li found here?

http://blog.raveis.com/badge/b.html

Confused on how to do this and I don\'t want to use negative margins. any

相关标签:
5条回答
  • 2021-02-08 03:18

    Make your li tags display:block; and float:left; (instead of display:inline;)

    0 讨论(0)
  • 2021-02-08 03:33

    This is rediculously late in the piece but I had the same problem today.

    I fixed it by laying out my HTML like so, thereby removing any space between the list it:

    <li>
      list-item 1
    </li><li>
      list-item 2
    </li><li>
      list-item 3
    </li>
    

    Example on Code Pen

    0 讨论(0)
  • 2021-02-08 03:37

    Surprised that no one mentioned line-height on the ul element. It's possible I didn't get the full question because the original link is now broken, but generally, line-height might be the way to go

    0 讨论(0)
  • 2021-02-08 03:39

    Try this.

    ul { font-size: 0; }
    
    0 讨论(0)
  • 2021-02-08 03:40

    Do you want using list center, you can using:

     ul { text-align: center; }
     li { margin-right: -4px; }
    

    How on this link

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