I've seen two ways of stretching a link over a card/container/div/whatever to make the entire thing clickable.
The first option positions the <a> tag as an absolute element.
The second option leaves the <a> untouched and places an absolute span tag inside - causing the a to expand and fill the container.
Is there an actual reason for one over the other?
.card {
height: 100px;
background: green;
position: relative;
margin-bottom: 50px;
}
.absolute-a, .absolute-span {
padding: 10px;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
<div class="card">
<a href="#" class="absolute-a">
Using absolute on anchor
</a>
</div>
<div class="card">
<a href="#">
<span class="absolute-span">
Using absolute span
</span>
</a>
</div>

