Maxim V. Pavlov
Maxim V. Pavlov

Reputation: 10509

Excessive UL margin in Chrome and Firefox

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:

strangeMargin

A uls style is the following:

excessiveMarginULStyle

li's style is:

excessiveMarginLIStyle

Exactly the same excessive margin appears in Firefox.

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

Upvotes: 0

Views: 729

Answers (1)

Maxim V. Pavlov
Maxim V. Pavlov

Reputation: 10509

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.

Upvotes: 2

Related Questions