See: http://jsfiddle.net/thirtydot/HksP2/
It looks great in IE9, IE8 and the latest versions of Firefox, Chrome, Safari, Opera; everything is in Windows 7. In IE7, it degrades quite well. On Safari on Mac, it's almost perfect.
This is based on the previous answer. Quote from this answer:
Please note that line-height and padding settings can be very difficult to get.
line-height: 1.83; It looks good, and you can find it by selecting something similar to what you wanted, then using the trial version and error to find something that works in both Chrome and Firefox (they display text on differently).
HTML:
<div class="tagline"> <h1><span> Oh Look A Headline Thanks </span></h1> </div>
CSS
.tagline { display: inline-block; width: 0; line-height: 1.83; padding: 1px 0; border-left: 20px solid #000; } .tagline h1 { font-size: 20px; font-weight: normal; color: #fff; background: #000; display: inline; padding: 8px 0; text-transform: uppercase; } .tagline span { position: relative; left: -10px; }
source share