This is the best way to do this, as used on the BBC and Guardian website:
http://codepen.io/IschaGast/pen/Qjxpxo
heres html
<div class="highlight block-link"> <h2>I am an example header</h2> <p><a href="pageone" class="block-link__overlay-link">This entire box</a> links somewhere, thanks to faux block links. I am some example text with a <a href="pagetwo">custom link</a> that sits within the block</p> </div>
heres CSS
.block-link { position: relative; } .block-link a { position: relative; z-index: 1; } .block-link .block-link__overlay-link { position: static; &:before { bottom: 0; content: ""; left: 0; overflow: hidden; position: absolute; right: 0; top: 0; white-space: nowrap; z-index: 0; } &:hover, &:focus { &:before { background: rgba(255,255,0, .2); } } } .highlight { background-color:
source share