Re: list-item alignment in CSS

Todd wrote,

>  <STYLE TYPE="text/css">
>    UL         { list-style: outside }
>    UL.compact { list-style: inside }
>  </STYLE>
>
>  <UL>
>    <LI>first list item comes first
>    <LI>second list item comes second
>  </UL>
>
>  <UL CLASS=COMPACT>
>    <LI>first list item comes first
>    <LI>second list item comes second
>  </UL>
>
> <snip>
>
> ... I say this should be corrected to:
>
>---
>
>  * first list item
>    comes first
>
>  * second list item
>    comes second
>
>
>    * first list
>    item comes first
>
>    * second list
>    item comes second

Oh, I've never seen it this way. I thought that "list-style: inside" 
meant that "the bullet [or other list-marker] is *inside* the list-item 
contents," and that "outside" meant that "the bullet is *outside* the 
list-item contents."

Unless I'm wrong - um - your example could be styled as

  <STYLE TYPE="CSS">
      UL UL { list-style: inside } /* should I add a margin-left? */
  </STYLE>

And then made into HTML as

  <UL>
    <LI>first list item comes first
    <LI>second list item comes second

    <UL>
      <LI>first list item comes first
      <LI>second list item comes second
    </UL>

  </UL>

--  

Dan Hale 
dhale@pobox.com
http://www.pobox.com/~dhale/

Received on Tuesday, 3 June 1997 22:58:22 UTC