Mr Kirkland

Internet Explorer Submit Button Horizontal Padding

Bookmark and Share

As you already know Internet Explorer takes great care to interpret HTML and CSS in it’s own special way and only sometimes does this co-incide with the W3C’s specification. The padding on Submit Buttons is one such nuisance.

Simply, IE simply ingores any horizontal padding you specify with css. The solution, I discovered, it to use the “overflow: visible” for all such elements e.g.

Before

<input type="submit" value="Internet explorer ignores my padding" style="padding: 20px;" />


After:
<input type="submit" value="Internet explorer respects my padding" style="padding: 20px; overflow: visible;" />

NB For this example I’ve put the style inline with the html - for real use this should be separated from the html in an external style sheet.

3 Responses to “Internet Explorer Submit Button Horizontal Padding”


  1. 1 Vince Jun 27th, 2007 at 11:19 am

    Thank you for this solution.
    It works very well on IE 6 and 7

  2. 2 Rene Robinson Sep 20th, 2007 at 9:29 pm

    Thanks so much - I have been looking for this for AGES!
    Thanks again.

  3. 3 Amanda C. Apr 7th, 2008 at 4:02 pm

    Thank you so much for putting this out here. I have been looking for a solution to this problem for a current project at work. This works perfectly.

Leave a Reply




Timezone

  • JST: 2008-10-08 14:17
  • BST: 2008-10-08 06:17
  • PDT: 2008-10-07 22:17