This question has been rephrased & discussed in this thread on SitePoint. The problem is now solved on the live site listed above, through the following two changes:
1) To keep the line length the same, a right padding must be added to the superimposed (shadow) element that matches the left positioning offset, as in:
h2 span.shadow { ...
left: -7px;
padding-right: 7px; ...
2) The superimposed (shadow) <span>
must be moved inside the <a>
and given a new stacking context, by changing the jQuery selector above to:
jQuery(".no-textshadow h1 a, .no-textshadow h2 a").each(function(){
and adding this CSS:
h2 a {
display: block;
zoom: 1.0;
position: relative;
}
I am still uncertain why (2) is necessary (or sufficient). There are some clues on the design page for jQuery Textshadow (this plugin was agreed to be a best-practice solution, to answer part of the original question). The two sections for Glow and Blur describe adjustments that must be made to element positioning, as well as nested <span>
elements each creating a new stacking context.
I would be open to other solutions & explanations and hope this helps anyone having the same problem.