Space between listitems

Giganews Newsgroups
Subject: Space between listitems
Posted by:  Veerle (veerlever…@hotmail.com)
Date: Mon, 16 Jun 2008

Hi,

I have a list:
<ul>
  <li>Li 1 - blablablablabla</div>
  <li>Li 2 - blablablablabla</div>
  <li>Li 3 - blablablablabla</div>
  <li>Li 4 - blablablablabla</div>
  <li>Li 5 - blablablablabla</div>
</ul>
When I change the style to:
  ul { margin: 0px; padding: 0px; }
  li { margin: 0px; padding: 0px; font-family:Arial,Helvetica,sans-
serif; font-size:12px; }
in IE7 there is still some space between the list items.

If I do the same thing with divs:
<div>Div 1 - blablablablabla</div>
<div>Div 2 - blablablablabla</div>
<div>Div 3 - blablablablabla</div>
<div>Div 4 - blablablablabla</div>
<div>Div 5 - blablablablabla</div>
With style:
div { margin: 0px; padding: 0px; font-family:Arial,Helvetica,sans-
serif; font-size:12px; }
Then the items are much closer to one another than with the list (in
IE7).

How can I change the css of the listitems or the list so that these
items are as close to one another as with the divs in IE7?

Replies