Vinod Kurup

Hospitalist/programmer in search of the meaning of life

Nov 14, 2005 - 1 minute read - Comments - web programming design css

Lists in CSS

A-ha! This article by Eric Meyer explains why <ul> and <ol>’s can appear differently in MSIE and Mozilla browsers. Both indent the list items, but MSIE does so by setting the padding to 2.5 em, while Mozilla does so by setting the margin to 2.5 em. These are on the <ul> and <ol> selectors, not the <li>. So, in order to get consistent display on both browsers, you need to set both padding-left and margin-left to whatever you want.

New York Marathon Eve We're married!

comments powered by Disqus