[Prev][Next][Index][Thread]

Re: list-item alignment in CSS



Hakon Lie wrote:
> ... The ascii rendering is misleading as it stands (.. but
> let me run it through Bert before adding it to the forthcoming errata
> sheet). With the keyword value 'outside', the marker will be put
> outside the box and the box will be formatted and positioned as any
> other box.

So then...

     Here's a paragraph preceding a list and it has
  a 2 em indent.

 a.  Here's a list item with a 2 em margin-left. The author
     has control over the position of the content but not the 
     list marker, which may be positioned to the left of the
     parent's left margin.

Is this the way it's done in the 'big 4.x' browsers? There goes my
biggest argument for block-indent -- that it's needed to define
list-item properties in terms of more general properties.

So, to reliably get this:

     Here's a paragraph preceding a list and it has
  a 2 em indent.

  a. Here's a list item with a 2 em margin-left and a list marker
     flush left to the parent's margin.

would require the :before pseudo-element declared?

  P            { text-indent: 2em }   /* or whatever */
  OL           { list-style: lower-roman }
  LI           { margin-left: 2em }
  OL LI:before { margin-left: -2em } 

Or will there be some other mechanism limited to list-items? 

David Perrell