Ezilon.com - Target Your Audience, be Seen in Your Region

Hide/show second level

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.
Sponsor

They have: 178 posts

Joined: Feb 2005

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's picture
Moderator

He has: 3,284 posts

Joined: Jul 2001

Triexa.com;207529 wrote: If I have this format:
How can I make the inner ul show or hide when hovering on the parent, without javascript...?

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? Smiling

(You could use Flash -- that's scripting too.)

Sponsor

They have: 178 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

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's picture
Moderator

He has: 3,284 posts

Joined: Jul 2001

Triexa.com;207536 wrote: 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

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. Smiling

nicora's picture

He has: 262 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

Joe Nicora
Webernet Wizard
See Me Create