Hierarchical folders (Rev 290)

Chuck, Charlie and Charles charles at charlesmcnulty.com
Thu Aug 3 19:17:31 CEST 2006

Brett Patterson wrote:
> Actuallly, you could use lists, you just have to nest the next <ul>
> element inside the previous <li> element.  So the <ul> becomes a child
> of the <li>
> Keep the same style, and the sub-<ul> element has the same widht and
> height as the other folders.  The only difference would be padding for
> text and the icon ;)  You pad the left so it "indents" the text and
> display block the entire link and voila!! you have a row that highlights!!

That's exactly as it was, and it wasn't working:

  <li id="inbox">inbox
      <li id="inbox.stuff">stuff</li>

In this (above) scenario, whenever you change the style of "inbox" you
change the style of all of it's sublists.  I changed it to:

  <li id="inbox">inbox</li>
    <li id="inbox.stuff">stuff</li>

Which appeared to look and act as it was supposed to, but as Thomas
correctly pointed out, it's not valid HTML, it just happens that the
browsers support it anyway.

Perhaps I don't understand what you're proposing.  If that's the case,
perhaps some sample HTML would help.


PS. Obviously there are myriad solutions to this problem in HTML, but
one that works without having to completely rewrite:
would be ideal.

More information about the Dev mailing list