HTML/CSS: Clickable link over a larger link
I have the following code
The goal is that I can click the “can you click me” box and go to google and clock anywhere else in the containing div to go to yahoo.
I can’t seem to make it work.
You can’t nest anchor elements. It’s invalid HTML.
12 Links - 12.2.2 Nested links are illegal
Links and anchors defined by the
a element must not be nested; an
a element must not contain any other
The best solution would be to position the first link so that it fills the entire container/wrapper, and then position the other link above it.