List items run outside of list and div area

前端 未结 4 2420
旧时难觅i
旧时难觅i 2021-02-19 17:11

I\'m having an issue with a menu un-ordered list. Whereby the list items are over running the

    and
    boundaries and only starting t
4条回答
  •  梦如初夏
    2021-02-19 17:53

    You can use float: left; on the lis instead of display: inline;.

    Just remember to also use overflow: hidden; on the parent element (the ul).

    Another option would be to use: display: inline-block, but I'm not 100% sure about the browser support.

提交回复
热议问题