Trying to center text with a drop shadow without using the CSS property. I'm utilizing span and :before for cross-browser compatibility. Here is what it currently looks like:
The HTML:
<h3 title="Say hello to Stack Overflow"><span>Say hello to Stack Overflow</span></h3>
And the CSS:
h3 {
margin: 0 auto;
font-size: 29pt;
color: #fefefe;
letter-spacing: 1px;
position: relative;
color: blue;
}
span {
position: absolute;
top: 0;
}
h3:before {
display: block;
padding: 4px;
content: attr(title);
color: rgba(0, 0, 0, .15);
}
The issue arises when attempting to center the h3 (with text-align), only the shadow part centers (here is a jsFiddle)
Looking for a solution to this problem.