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?

Member Avatar for diafol

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.

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/

commented: Ah - I think I see what he was getting at now :) +15

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.