views:

70

answers:

3

Is there a way of completely removing the styling of a button in Internet Explorer? I use a css sprite for my button, and everything looks ok.

But when I click the button, it moves to the top a little, it makes it look out of shape. Is there a css click state, or mousedown? I don't know what triggers that state.

I know it's not a really big deal, but sometimes it's the small things that matter.

A: 

Try removing the border from your button:

input, button, submit
{
  border:none;
}
Sarfraz
+1  A: 

i think its the button active state

Midhat
It has to be the active state, you are right +1 for that. But i did not get it to work properly
Saif Bechan
+1  A: 

I'm assuming that when you say 'click the button, it moves to the top a little' you're talking about the mouse down click state for the button, and that when you release the mouse click, it returns to its normal state? And that you're disabling the default rendering of the button by using:

input, button, submit { border:none; } 

If so..

Personally, I've found that you can't actually stop/override/disable this IE native action, which led me to change my markup a little to allow for this movement and not affect the overall look of the button for the various states.

This is my final mark-up:

<span class="your-button-class">
    <span>
        <input type="Submit" value="View Person">
    </span>
</span>

This CSS Buttons tutorial is the article I referred to to start the above, but as you can see, I had to amend it to support the input button.

a darren
This is what i was looking for. Thank you
Saif Bechan