scriptygoddess

16 Feb, 2007

Extra space (padding) with List Items in IE

Posted by: Jennifer In: CSS

For the past couple of days, I've been trying to figure out why a design I had been working on was showing extra padding (veritcally) in IE. I think I'd seen every solution such as: write the code like this:

<li>Item one</li><li>
Item two</li>

or make set them to float: left | right (which messed up the way the list was showing up…

The only thing that worked for me – was setting the line-height to the be the same size as the font-size used for the list. ie:

li {
font-size: 12px;
line-height: 12px;
}

And then you can add your own specific padding or margins as needed… Hope that saves someone the headache I just went through!!

4 Responses to "Extra space (padding) with List Items in IE"

1 | WebWeaver

March 14th, 2007 at 9:45 pm

Avatar

Thanks! exactly what I was searching for… couldn't figure this out with out adding a tons of stuff. This was easy and works!

2 | Nate

May 7th, 2007 at 11:31 am

Avatar

wow, thanks. I was trying to figure this out, too

3 | Jackson Capper

June 18th, 2007 at 11:55 pm

Avatar

Hooray hooray, thankyou so much

4 | John Pruitt

October 27th, 2008 at 2:34 pm

Avatar

Thank you, thank you, thank you. I've been trying to figure this out for hours.

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements