How to make part of the line for “Who” disappear in CSS?

The easiest way to explain this is with the code: http://jsfiddle.net/fjZfL/37/

I want it to be like

who ----------------

If the line is completely "gone" for whom.

I know that I can make h3 a white background so that it disappears, but there is a background image on my website that, if it is replicated again, will look inconsistent.

You can absolutely change the markup, but hopefully not too much.

+4
source share
2 answers

Instead, you can try adding a pseudo-element - http://jsfiddle.net/ZZbce/

h3:after { content: ''; width: 150px; height: 1px; background: black; display: inline-block; vertical-align: middle; } 
+6
source

Try it. http://jsfiddle.net/fjZfL/55/

This will work in all browsers.

+1
source

All Articles