You can also use pseudo-elements to achieve this. So HTML does not change:
<a href="#">Lorem ipsum dolor sit amet,<br/>
consectetur adipiscing elit,<br/>
sed do eiusmod tempor</a>
But CSS:
a {
color: #000;
border-bottom: 1px solid #000;
padding-bottom: 5px;
text-decoration: none;
font-size: 20px;
line-height:40px;
position:relative;
}
a:before {
content:"";
position:absolute;
cursor:pointer;
left:0px;
top:0px;
width:100%;
height:400%;
}
Demo: http://jsfiddle.net/zbxyjdvb/11/
Depending on your size, a blockyou will have to play a little with height ...
source
share