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?