IE 6 Gotcha Moment: HTML Button Element

So, for the past hour I’ve been trying to figure out why a website I’m working simply fails to render on IE 6. I finally traced it down to a rogue button element, which appeared to be well-constructed but was still making IE 6 barf spectacularly. In the off-chance this ever happens to anyone else, here’s a tip: ensure that your button elements are constructed with a real closing tag as opposed to the short form (or whatever the real name for it is).

i.e.: <button> </button> instead of <button />

Possibly Related Posts:


3 Comments

  1. Larry V
    Posted November 14, 2007 at 8:07 pm | Permalink

    Hmm, those examples of button code are actually being rendered as buttons :P

  2. Posted November 14, 2007 at 9:25 pm | Permalink

    Hey Larry - I guess you’re not using IE 6 ;-) Fixed… It always throws me that Wordpress doesn’t support WYSIWYG blog editing in Safari.

  3. Ryan
    Posted November 17, 2007 at 1:28 pm | Permalink

    This has bitten me big time in the past, and it applies to other tags, as well — script and span come to mind. It’s gotten to where I simply always use an explicit closing tag in HTML except for tags that don’t have any content. It’s just safer.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*