I want to draw a line to the left and right of a headline, like this:
Normally I would do this by adding a border-top to the surrounding element and the following style for the headline.
h2
{
margin-top:-10px;
padding: 0 5px;
background:white;
}
But in this case, I cant do it this way, because the background of the surrounding element is transparent, as you can see in this fiddle: http://jsfiddle.net/tUmZY/2/
I'm playing around with this for a while now, but I have no idea how to achieve this. I would appreciate any sollution, as long as the effect is the desired.