I have an element that uses box-shadow to give it a background that follows the length of an inline element and, more importantly, stays consistent when you shrink the window and the text spills into a new line.
http://jsfiddle.net/ric0c/dgersydv/
-moz-box-shadow: 4px 0 0px 0px #7E8573, -10px 0 0 #7E8573;
-webkit-box-shadow: 4px 0 0px 0px #7E8573, -10px 0 0 #7E8573;
box-shadow: 4px 0 0px 0px #7E8573, -10px 0 0 #7E8573;
background: #7E8573;
color: #fff;
line-height: 30px;
padding: 5px 10px 5px 0px;
margin: 18px 0;
font-size: 20px;
display: inline;
white-space: pre-line;
position: relative;
left: 10px;
Now this works correctly on Chrome and Safari but I'm getting inconsistencies on Firefox. If use white-space: pre-line;
I lose the "padding" on the left and right sides. If use white-space: pre-wrap;
the text no longer stays in line with the line above when it spills over.
Any thoughts on how to get this consistent on all browsers?