1. Home
  2. Computing & Technology
  3. Web Design / HTML
Jennifer Kyrnin
Jennifer's Web Design / HTML Blog

By Jennifer Kyrnin, About.com Guide to Web Design / HTML

Indenting Lists Consistently Across Different Browsers

Friday July 3, 2009
Indenting lists is one of those frustrating aspects of the browser wars. Browsers like Opera and IE give the UL or OL element some left margin, while browsers like Firefox and Safari give the UL or OL element some left padding. So, when you're testing your Web pages in one browser or another, it can be very frustrating to change the margins of your UL and have Firefox ignore you. But with CSS you can learn to indent lists and have your changes look the same in most browsers.

More About Indenting Lists

Comments
July 4, 2009 at 1:04 pm
(1) Alexander says:

Nasty at first, but once you understand it and get used to it, it doesn’t even bother you. (At least that’s how it is with me. ) You would probably just zero-out both of them and set whatever property suits you. It’s the same concept the with headings’ top margins, I believe.

July 5, 2009 at 9:25 am
(2) Darrin says:

I tend to use a reset style sheet to bring all (most) browsers into line, and then work off a blank slate of default style settings; so all lists are initially set to zero padding and zero margins. From there I set text-indent, paddings, margins, etc.

Some would argue a reset style sheet is a bit overkill, but it does “solve” the problem of browser inconsistencies nicely.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore Web Design / HTML
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.