Excessive UL margin in Chrome and Firefox

你说的曾经没有我的故事 提交于 2020-01-16 03:53:11

问题


In my html, I have a generated ul element that hold li's with img's in them.

I get a strange 3px (approx) excesive margin between my li's in addition to css defined margin.

Here is a Chrome debug console snapshot. A excessive area is outlined with red:

A uls style is the following:

li's style is:

Exactly the same excessive margin appears in Firefox.

Why is it there? How do I get rid of it?


回答1:


Solved. It's how browsers render line breaks between li's. Had to force the html generator render all li's in one line to remove the space between.



来源:https://stackoverflow.com/questions/9754294/excessive-ul-margin-in-chrome-and-firefox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!