Closed Bug 136006 Opened 22 years ago Closed 22 years ago

input fields do not display if preceded by <label> element.

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows XP
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 100801

People

(Reporter: heff, Assigned: rods)

References

Details

I've checked and checked again...sorry if this has been reported before, but i
wasn't able to find anything by searching bugzilla...tho i must admit I'm always
confused by that interface. 

This is happening on Win XP using Netscape 6.2

For example, the following code does not work...Netscape only displays the
fieldset legend and border. No form fiels or buttons are displayed. Very
strange. If I remove the <label> elements, the form displays correctly.

<form action="mailto:me@mine.com" method="post">

<fieldset>
<legend> Personal Info </legend> 

<!--
<label for="fname" accesskey="f">First Name:</label> -->
<input type="text" id="fname" class="textfield" name="fname" /> 
<!--
<label for="lname" accesskey="l">Last Name:</label> -->
<input type="text" id="lname" class="textfield" name="lname" /> 

<div class="buttons">
<input type="submit" value="send" />
<input type="reset" value="clear" />
</div>

</fieldset>

</form>
*** Bug 136009 has been marked as a duplicate of this bug. ***
Reporter's comment from the dup:

I just submitted a "bug?" that Netcape 6.2 doesn't seem to display input 
fields when preceded by <label>. I stupidly forgot to point out that it 
the "bug?" occurs when you set the labels as block level elements in your CSS. 

So, setting:

label { display: block; }

makes the asscociated input fields disappear, and their space collapses.

Also, in the code i posted, I forgot to remove my comment delimiters which i 
was using for testing. sorry...
Duplicate of "label {display:block} causes severe layout problems" (fixed by
forcing labels to always be inline; a suboptimal solution :[ ).

*** This bug has been marked as a duplicate of 100801 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.