You are hereHome / Development / Mozilla 1.0 strikes back

Mozilla 1.0 strikes back


By Gerd Riesselmann - Posted on 08 April 2005

Just releasing the online marketplace I did the last months in my spare time, I stumbled upon the float label bug from the Mozilla 1.0 branch. This bug kills all my labels - and there are quite a lot of them.

It stroke me that Mozilla 1.0 is still in use by quite some people: It lives on as Netscape 7.0 - which I was told is the most current browser running on Mac OS 9. I couldn't believe this: No modern browser on Mac OS 9? I started to dig through the websites, and indeed: There is no Mac OS 9 build of Mozilla or Firefox available. The same holds for Opera: Version 6 only.

Amazing.

However, I did what I should have done long before: I wrapped up creating input elements and their according labels into a couple of neat functions so rather than saying

<label for="name" class="left">Name:</label>
<input type="text" class="text" id="name" name="name" />

I now write

print FormElements::textBox("name", "Name:");

Morale? Repeating code indicates a missing function. Even if it is repeating html code. And you better build that function early.

Update: Silly me, hit publish too early. The function of course wraps the label in a span and floats that. And since it is done in a single place, it will be easy to remove this patch, if floating labels is not wanted anymore.