ColdFusion, WordPress, Flash & other web things


Button widths in IE

Today, I finally came accross a fix for the ridiculous widths of form buttons in IE. Jehiah Czebotar came up with this solution and it works perfectly. No more rediculously wide IE buttons.

Update

To make Jehiah's solution work in "standards" mode, don't forget to add a unit to the dummy width rule for IE:

<style>
td { border:1px solid red; }
.button {
	margin:0;
	padding:0 .25em;
	width:auto;
	overflow:visible;
}
</style>

<!--[if IE]>
<style>
.button { width:1px; }
</style>
<![endif]-->

5 comments

  1. #1: Jehiah Says:

    hah, thats funny. I didn’t realize i spelt “rediculously” wrong. Time for me to add a spellchecker to wordpress ;-)

    thanks

    Jehiah

  2. #2: Brownspank Says:

    Silly me, I didn’t catch the real root of the problem before; it was the unit all along! Anyway, more improvements have been made to the fix, thanks to a reply I got.

    Thanks for pointing that out. Makes this fix all the more understandable. ;)

  3. #3: Jinnah Says:

    Thanx to Jehiah. Feeling so relaxed after getting a solution to “rediculously” wide buttons in IE. I ve tried it out, its perfect.

  4. #4: SEO Says:

    OMG Iv been looking for this fix for ages. Thanks

  5. #5: getitornot Says:

    I like the fact that you always reffer to the original source. Very humble as some people could fob it off as their own.

Leave a comment