Link to home
Start Free TrialLog in
Avatar of bt33
bt33Flag for Netherlands

asked on

How to remove padding on a submit button?

I'm trying to make a submit button, with an image as background-image, which works perfectly in firefox but in IE6 and 7 there is some padding I can't seem to get rid of.

My HTML code:
<input type="submit" value="" id="submit">

My CSS code:
height:29px;
width:105px;
padding:0;
margin:0;
border:1px;
background-image:url(srchbtn.gif);

Any ideas how to get rid of the padding? IE versions and forms/inputs are always so annoying.
Avatar of gamebits
gamebits
Flag of Canada image

I usually do it with an inline css

<input type="submit" value="" id="submit" style="padding: 0px; margin: 0px;">
Avatar of bt33

ASKER

inline css? display:inline;? doesn't seem to work for me.
Avatar of bt33

ASKER

Now I think of it, the background-image doesn't start at the topleft, I assumed it was padding but maybe the background-image isn't set correctly somehow.
ASKER CERTIFIED SOLUTION
Avatar of bt33
bt33
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial