Why do my list item bullets overlap floating elements

前端 未结 23 1287
半阙折子戏
半阙折子戏 2020-11-28 18:00

I have an (XHTML Strict) page where I float an image alongside regular paragraphs of text. All goes well, except when a list is used instead of paragraphs. The bullets of th

23条回答
  •  孤街浪徒
    2020-11-28 18:29

    By adding overflow: auto; to your ul works for me at least.

    Update

    I've updated my jsfiddle to visualize what's going on. When having the ul beside the floating img, the content of the ul will be pushed by the float, but not the actual container. By adding overflow: auto the whole ul-box will be pushed by the float instead of only the content.

提交回复
热议问题