0

https://jsfiddle.net/c9jmjcy0/3/

The reason that it doesn't work is because for some reason <a> denies wrapping <div>. Probably specification. The only solution is to wrap it around other item.
Do we have any other item that would say "it's a link/dropdown". There's also <button>. But it doesn't wrap it either, it just creates button with these values.

If I wrap it in another div, then I'll start having spaghetti HTML, which I try to avoid pretty hard.

Is there no other way to make this CSS work (when it comes to understood functionality) without adding wrappers?

3
Contributors
3
Replies
34
Views
10 Months
Discussion Span
Last Post by Aeonix
0

I'm having real difficulty understanding what you mean and linking the fiddle with what you want to do.

You have a non-link (no href) anchor around a div containing links ('hrefed'). Not sure I follow the logic. If you're looking for a dropdown menu or an accordion, there are literally thousands out there.

2

You can't have anchor tags within an anchor tag and think about it for a second... does it make sense?
In order to show/hide the div while hovering the anchor, that div needs to be a sibiling of the anchor and not a child.

Something like this:
https://jsfiddle.net/gentlemedia/vc639va4/3/

Votes + Comments
Ah - I think I see what he was getting at now :)
0

Yea, that will work great too. Thanks.

I'm having real difficulty understanding what you mean and linking the fiddle with what you want to do.

Yea I don't know why. I don't speak Russian, but you're not dumb. I just have a hard time explaining it, sorry, I'm not native to English.

Edited by Aeonix

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.