0

I want to put text in the middle of a horizontal rule, but have the text "break" the horizontal line but with a transparent background. Like this:

Horizontal rule

but with the line not going through the words.

Daniel Fowler
  • 385
  • 7
  • 21
  • ok, so here you go. Give both an absolute position, give the line a z-index of -1 and the text a z-index of +2 and voila. The other option is to have the text's div be the same width as the HR, then give the text a position relative with a -y value to pull it up. But that's sketchy. – VikingBlooded Jul 09 '14 at 13:16
  • You could not use a horizontal rule, but instead use a psuedo element before and after and have a border-top and adjust the position kind of like http://jsfiddle.net/zxzLT/22/. – Aibrean Jul 09 '14 at 13:22

0 Answers0