triskellian: (cartoon me ibook)
[personal profile] triskellian
I mentioned on [livejournal.com profile] secretrebel's journal earlier today that I'd been playing with a new CSS trick. [livejournal.com profile] chrisvenus and [livejournal.com profile] wimble both asked what it was, and I said I'd post the details here.

It's a nice method of making drop-down menus with CSS... I found the technique at A List Apart, but that only worked with two levels of nested menus. I've now fiddled with the stylesheet to make it work with three levels.

The working version is here, and this is the CSS. The 'leftcol' div needs to appear after the 'content' div in the HTML, to make sure that the expanding menus display over the top of the content div.

(To work with IE, the technique requires a teensy bit of Javascript, which is documented on the ALA page. I didn't include it, because I'm working on pages only I will use, and I never use IE.)

Date: 2004-07-07 09:00 am (UTC)
From: [identity profile] onebyone.livejournal.com
Correct. The problem is that the CSS spec says of the "hover" and "active" dynamic pseudo-classes that "CSS doesn't define which elements may be in the above states, or how the states are entered and left".

IE only allows links to be in the "hover" state (and it's that state which triggers the expanding of the sublist), whereas apparently everyone else in the known universe allows li to be in "hover" too.

April 2013

S M T W T F S
 123456
78910111213
141516171819 20
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 28th, 2026 10:23 am
Powered by Dreamwidth Studios