S
S
Sergey750il2019-12-16 21:21:54
css
Sergey750il, 2019-12-16 21:21:54

How to make an entire block a link?

Good day. What is the right way to make the entire block a link, but at the same time it would contain one more link?
There is an idea to wrap everything in a tag and change the divs to span.
https://jsfiddle.net/caqLu2pv/1/

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Ankhena, 2019-12-17
@Sergey750il

If we take into account the specification, then:
1. You cannot put a link in a link. So the second one needs to be placed next to it and sent to the right place by positioning.
At the same time, you need to be sure that the user will understand where and why to click.
2. Links have a transparent content model. Since we cannot be 100% sure where the link will be inserted, the divs inside it need to be replaced with a span (or semantic equivalents).

M
Max, 2019-12-16
@TeeRision

Maybe I'm wrong somewhere, but why not just insert a tag within a tag ?<div>

<a href='#' target='_blank' class='button'><div сlass='about-me'>fdfds</div</a>

X
xmoonlight, 2019-12-16
@xmoonlight

Link->block->block->link.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question