Control form button width in IE6

I’m working on a project with shiny, happy submit buttons all over the place. To offer more control over the presentation, we are using the form button element and inserting images inside the button tags.

...

Now, you need to over-ride some pretty ugly default presentation styles:


form button {padding:0; margin:0; border:none; background:0;}

This works fine and dandy until you get to IE6. The buttons tend to get really large with IE. So, you need to re-define the width of the buttons and apply overflow:visible. Here’s the entry in your IE6.css file:

form button {width:1%; overflow:visible;}

Resources

Special thanks to Jehiah Czebotar for saving me a bunch of time trying to figure this out.


Posted

in

, , , , , ,

by

Tags:

Comments

5 responses to “Control form button width in IE6”

  1. Jehiah Avatar

    so what do the shiny/happy buttons look like?

    (and your welcome… i’m glad i was able to solve it!)

  2. Jie Avatar

    thanks dude

    form button {width:1%; overflow:visible;}

    this really helped…

  3. Brian Avatar

    cool, thanks. I just found what I needed. Stupid ie6 and their stupid form button default width and padding.

  4. Anonymous Avatar
    Anonymous

    cool, thanks

  5. Edwin Rios Avatar
    Edwin Rios

    Thank you buddy, you saved me a lot of hours of work!!

Leave a Reply

Your email address will not be published. Required fields are marked *