I have encountered an issue with the padding of the title being outside the div. To see the problem, check out my jsfiddle:
<!-- HTML -->
<div>
<h2><a href="#">This is a test text</a></h2>
</div>
/* CSS */
div {
position: relative;
float: left;
width: 500px;
height: 300px;
background: red;
}
div h2 {
position: absolute;
bottom: 0;
left: 0;
margin: 0;
}
div h2 a {
padding: 10px 20px;
background: green;
}
I'm looking for suggestions on how to fix this issue. Any ideas?