[Standards-JIG] Re: XHTML further simplification

Byron Ellacott bje at apnic.net
Fri Sep 24 02:52:51 UTC 2004


Ian Paterson wrote:
> Byron wrote:
>>ol, ul {
>>     padding-left: 40px;
>>     margin-left: 0;
>>     -moz-padding-start: 0;
>>}
> Thanks. That makes margin-left work well for Gecko, IE6 and Opera.
> Here is a modified version of Peter's document that works on all browsers.
> It demonstrates padding for unordered lists and margin for ordered lists:
> http://www.clientside.co.uk/xhtml-im.html

Interestingly, the "-moz-padding-start" property must be specified
before the "padding-left" property, at least in Firefox 0.9.3, else the
"padding-left" is ignored.  So, better recommended stylesheets, for 
allowing margin-left or padding-left respectively, are:

    ul, ol { -moz-padding-start: 0; margin-left: 3em; padding-left: 0; }
    ul, ol { -moz-padding-start: 0; padding-left: 3em; margin-left: 0; }

For fun, add "ol, ul, p {background-color: #eef; margin-top: 0; 
margin-bottom: 0; }" to your style; as you pointed out, it fills padding 
space but not margin space.

-- 
bje



More information about the Standards mailing list