[ALUG] HTML question - how to create a sequence of varying indents

Chris G cl at isbd.net
Mon Oct 15 17:00:10 BST 2007


On Mon, Oct 15, 2007 at 03:08:19PM +0100, Brett Parker wrote:
> On Mon, Oct 15, 2007 at 02:04:12PM +0100, Steve wrote:
> >  On Sat, Oct 13, 2007 at 11:34:52AM +0100, Greg Thomas wrote:
> > > On 12/10/2007, Chris G <cl at isbd.net> wrote:
> > >> I want to lay a list of items out as follows:-
> > >>
> > >> item1
> > >>  item2
> > >>   item3
> > >>    item4
> > >>     item5
> > >>
> > >>
> > >> Wnat's the simplest way of doing this in HTML?
> > > <ul><li>item1
> > > <ul><li>Item2
> > > <ul><li>item3
> > > <ul><li>item4
> > > <ul><li>item5
> > > </ul></ul></ul></ul></ul>
> > Except you didn't close the <li>s
> 
> And the nesting was awful.
> 
> Something like:
>     <ul>
>         <li>item1
>             <ul>
>                 <li>item2
>                     <ul>
>                         <li>item3
>                             <ul>
>                                 <li>item4</li>
>                             </ul>
>                         </li>
>                     </ul>
>                 </li>
>             </ul>
>         </li>
>     </ul>
> 
> And for the styling:
>     ul {
>         list-style: none;
>         margin: 0 0 0 0.5em;
>         padding: 0;
>     }
> 
Yes, I'd worked out the css bit.

The layout of the HTML is somewhat academic as it's machine generated
'dynamic' code.

-- 
Chris Green




More information about the main mailing list