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!!

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

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.

Comment Form

Featured Sponsors


  • Curt: If anyone comes across this with similar issues I was able to sort out the pagination issues painlessly with easyCommentsPaginate from http://www.mush
  • Christopher: Yeah, it is indeed hard to do. And something remains elusive about why the pagination never worked. I tried everything I could find. Regardless, I
  • Jennifer: Hi Christopher, always hard to bug test stuff like that remotely. Sorry those didn't help. Glad you found a solution though :)

About


Advertisements