Posts Tagged ‘internet explorer’

Internet Explorer 7 double padding submit button

Internet Explorer is the nightmare of every web-developer. As you go lower and lower with the version numbers (8-7-6) it’s going to make more and more headache for you.

Recently I found a very nasty bug in IE7. When creating a search form, my submit button did not appear as I wished, like in Chrome, Firefox, IE8. Added a default 10px padding to the left and right of the button.

IE7 ignored all of the horizontal padding I specified with css.

After some googling I found the solution:

Before:

<input type=”submit” value=”Submit button NOT OK” style=”padding: 20px;” />

After:

<input type=”submit” value=”Submit button OK” style=”padding: 20px; overflow: visible;” />

Note: the example above is correctly visible only in IE7!

Test every Internet Explorer with meta tag

There’s only one thing that makes the life of a web-developer a Hell, and it’s the cross-browser compatibility. And the biggest problems, of course, are with Internet Explorers. We are so lucky there are at least 4 versions of it in which our application/site should work at this time. Installing every one of the versions on the same station is not possible, and the softwares from the market are not always 100%. So, if you want to test your work in the major IE versions, you can use the following code:

<meta http-equiv=”X-UA-Compatible” content=”IE=IEVersion” />

I used it from Internet Explorer 8, and placed the code right after the <body> tag.