问题
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 ul
s 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