Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

The float label bug

Strange Mozilla bug: In some versions of Mozilla / Netscape 6+ <label> elements that have a float applied to them will vanish. Tom Gilder’s test case can be viewed here. I tried it in Mozilla 1.1 beta and the page behaved as expected but Netscape 6.22 suffered from the bug. Apparently Netscape 7 still has the bug, which would suggest it was spun off from the Mozilla code base before that bug was fixed. Rust Randal’s CSS form demo gets around this problem with a span inside a label, which seems to be the most effective workaround but is frustrating as it requires additional markup to solve what is a pretty obscure bug.

This is The float label bug by Simon Willison, posted on 12th September 2002.

View blog reactions

Next: The RDF in RSS

Previous: Surfing the apocalypse

7 comments

  1. Isn't Netscape 7 (final) based on Mozilla 1.0.1? Maybe the whole Mozilla 1.0 branch has this bug, but it's fixed in 1.1 and above (haven't tested it in 1.2 yet, though)

    Shot - 12th September 2002 21:36 - #

  2. Indeed, the label bug was fixed in 1.1 but not the 1.0 branch. It appears that the fix for label is now being checked into 1.0, though.

    Tom Gilder - 12th September 2002 23:46 - #

  3. Additionally, the label tag cannot accept any display changes (e.g. display:block).
    This also seems to have been fix since 1.1.

    dlance - 25th March 2004 20:36 - #

  4. The link for the CSS Form Demo is no longer there. Could someone explain what the fix is, please? I'm absolutely stumped here.

    Rich - 17th April 2004 05:13 - #

  5. The demo does not work. I have tried inserting a span in the content area of the label tag but the label content still disappears in Netscape 6 - can someone elaborate on the fix? Thanks.

    Lloyd - 20th December 2004 15:09 - #

  6. What about Nescape versions greater than 7.0? Are they affected too?

    katchi - 21st March 2005 09:44 - #

  7. I tested it in Netscape 7.0: The css class moved from the label to the content surrounding span-tag. It worked fine!

    dante - 27th July 2005 09:24 - #

Comments are closed.

Previously hosted at http://simon.incutio.com/archive/2002/09/12/theFloatLabelBug

A django site