W3C home > Mailing lists > Public > www-style@w3.org > June 1997

Re: list-item alignment in CSS

From: Hakon Lie <howcome@w3.org>
Date: Sat, 7 Jun 1997 00:49:46 +0200 (MET DST)
Message-Id: <199706062249.AAA10355@online.no>
To: "David Perrell" <davidp@earthlink.net>
Cc: www-style@w3.org
David,

 > There's a quick'n'dirty table-based list-item example at
 > <http://www.hpaa.com/css1/lists.html>. Is this the correct
 > interpretation?

Quoting from that page:

    UL { margin-left: 0 }
    ULLI{ 
      background: #CC3366;
      font-size: 17px; 
      line-height: 20px;
      margin-left: 40px; 
      margin-bottom: 6px 
    }

To be safe, I'd set padding and border to 0 as well.

  How it should be rendered (list simulated with a table):

  The left margin of this text should be 40 pixels to the right of the
  previous element's left margin.

Correct if you by "left margin" mean the "left inner edge".

  The background color should extend all the way to the right margin
  because this is a block-level element.

Correct. 

  The background color should extend only to the edges of the text at
  the left, top, and bottom, because there is no padding.

Correct

  The list bullet should not have any background color because
  background color is not inherited.

I'd say: "The background of the list-item marker should be that
of the UL element, not the LI element."

  The list bullet's horizontal position is undefined. Your browser can
  put it wherever it wants to.

Correct. 

Also, in right=to-left text, the markers would have been on the right
side of the box.

  There should be a 6 pixel space between the element blocks because
  there is a 6 pixel bottom margin on LI.

Correct.

Regards,

-h&kon

H      k   o   n      W   i   u   m       L   i   e
howcome@w3.org   W o r l d   Wide  W e b  Consortium
inria # FRANCE http://www.w3.org/people/howcome
Received on Friday, 6 June 1997 18:49:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:50 GMT