I'm looking for a solution that can consistently restrict the clickable link area to just the text within my h2 element. The problem arises when the space to the right of the text is mistakenly included in the clickable region.
Here's an example:
markup:
<a href="#p1">
<h2 class="page services">xxxxxxxxxxxxxxxxxxxxxxxxxxxxx</h2>
</a>
css:
h2.services {
font-size: 16px;
}
Check out the demo here: http://jsfiddle.net/j7n3k/
Note - I prefer solutions using only CSS and no JavaScript or jQuery. If there are responsive solutions available, even better. Thank you!