I have this CSS:
a.LinkButton
{
background: transparent url('/Images/ButtonLeft.png') no-repeat top left;
display: block;
float: right;
font: normal 12px Arial;
line-height: 15px;
height: 23px;
padding-left: 9px;
text-decoration: none;
margin-left: 5px;
}
a:link.LinkButton, a:visited.LinkButton
{
color: #494949;
}
a.LinkButton span
{
background: transparent url('/Images/ButtonRight.png') no-repeat top right;
display: block;
padding: 4px 9px 4px 0;
}
a.LinkButton:active
{
background-position: bottom left;
}
a.LinkButton:active span
{
background-position: bottom right;
}
and this HTML:
<a class="LinkButton" href="Whatever"><span>Button Text</span></a>
So, a pretty standard “sliding doors” technique to cater for varying text widths. In Firefox and IE7 (I’ve not been able to check IE6) it works as expected - if the mouse button is held down anywhere on the button, the image moves as expected.
BUT, in IE8, that only happens if the mouse button is held down on the left side of the button. If it’s held over the right side (actually more likely, as it’s bigger!) the graphic does not change.
Please can someone spot what I’m doing wrong?
Thanks, Nick