Hide/show second level
If I have this format:
<ul>
<li><a href="/">Index</a>
<ul>
<li><a href="/">Index sublink</a></li>
</ul>
</li>
</ul>
How can I make the inner ul show or hide when hovering on the parent, without javascript...?
SonicMailer Pro - Professional mailing list manager & award-winning email marketing software
Download a FREE 30-day trial today!
Use coupon savemoreon4 and save 10%!
Abhishek Reddy posted this at 22:35 — 19th September 2006.
He has: 3,348 posts
Joined: Jul 2001
You can't avoid scripting, as far as I'm aware. Certainly you shouldn't be able to, as neither XHTML nor CSS have any semantically sensible means of achieving this. Scripting is supposed to handle it.
Why are you averse to JS?
(You could use Flash -- that's scripting too.)
Triexa.com posted this at 22:57 — 19th September 2006.
They have: 173 posts
Joined: Feb 2005
Well, what I COULD do is...
li:hover, which works in I think just about evberything except IE seeing as how ie only likes a:hover
Abhishek Reddy posted this at 23:32 — 19th September 2006.
He has: 3,348 posts
Joined: Jul 2001
Yes, I thought there might be some :hover trickery that could conceivably do it. However, I could not figure out how you'd modify the style of an element from the :hover pseudoclass belonging to another. Did you get this to work?
Even if it is possible, I wouldn't think it sensible. While it would be appropriate to describe the visible and invisible styles of the child
using CSS, it is the scripting language's business to trigger the switch from an event in the parent.
You haven't said why you want to avoid scripting.
nicora posted this at 03:24 — 22nd September 2006.
He has: 267 posts
Joined: Nov 2001
I doubt you will ever get it working without any script, it's not what CSS is meant to do.
Take a look at son of suckerfish
http://www.htmldog.com/articles/suckerfish/dropdowns/example/bones2.html
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.