Previous Message
Next Message

Re: [css-d] div:hover?

Sent by Stuart Langridge on 12 June 2002 01:01


Eric A. Meyer spoo'd forth:
>>I've had this idea in my head for a while; after I threw together the
>>aqTree code (http://www.kryogenix.org/code/browser/) to turn nested
>>lists into expand/collapse trees with JS, I thought: the same would
>>work with dropdown menus.
> 
>    Very cool!  The tricky part for CSS is the 
> click-to-expand/collapse, which I don't know that browsers will do. 
> It all depends on how far :focus has been extended.  If I can write, 
> for example:
> 
>    li:focus > ul {display: block;}

Right, that's it, I have to find a way to upgrade Debian Woody to have
Mozilla 1.0 :)

>>Better still, it could be done with pure CSS
>>(although you'd still need JS to actually *generate* the newly nested
>>set of lists, so I'm not sure if it would buy you anything).
> 
>    How so?  If you have the list from the beginning, and just use CSS 
> to switch parts of it on and off, then Javascript becomes unnecessary 
> for this particular application.  Or did I misunderstand something?

No, you're entirely right about doing it with pure CSS from the
beginning; my original explorer-tree-interface code converts one HTML
structure (nested unordered lists) into another (the explorer
interface) by physically removing one from the document and writing the
other in its place with the DOM (from JS), which is obviously not the
approach to take if you can do it with pure CSS!

sil

-- 
"Willow hath gat hare off rede
 And doth geev soopurb heede.
 Buffy, as written by Geoffrey Chaucer, the dirty mediaeval git."
           -- Andy Spencer, after Certic
Previous Message
Next Message

Possibly related: