Does anyone know how to create a line after each h2 tag when the width of the headline varies?
I have been using the :after method with this code:
h2:after {
position: absolute;
content: "";
height: 2px;
background-color: #242424;
width: 50%;
margin-left: 15px;
top: 50%;
}
You can view the code here: http://jsfiddle.net/s9gHf/ However, I am having trouble with the line being too wide and causing layout issues.