I have an H1 element immediately after an anchor tag. For design purposes the line-height of the H1 element is set to '0.9'.
This makes the H1's computed height shorter, but the actual Text element inside the H1 seems to be overflowing and partially covering up the anchor tag, making it hard to click. (Tested in Chrome and Safari, the bottom two thirds of the link is un-clickable)
I've added borders to both elements here to show the boundaries, and selected part of the title in my browser so you can see how the overflowing text is covering the link:
I can fix this by setting overflow: hidden
on the H1, but I'm wondering if there are any cleaner solutions.
a {
border: 1px solid blue;
}
h1 {
color: magenta;
font-size: 120px;
margin-top: 0px;
line-height: 0.9;
border: 1px solid magenta;
}
<a href="www.google.com">Link Covered By </a>
<h1>Title</h1>
See the problem in action here: CodePen