From: Stanimir Stamenkov on
Tue, 06 May 2008 15:30:48 -0500, /Chris Riesbeck/:

> What's the right way to make sure checkboxes stick with their labels
> when the window is resized?
>
> Right now I'm trying <label><input ...> text</label> with
> white-space:nowrap on label, but this only seems to work in Firefox and
> IE 7.
>
> In IE 8 and Opera I get one long line, as if the nowrap applied outside
> the label elements.
>
> In Safari for Windows, it groups the text with the checkbox on the right
> instead of the left! That one I can't figure at all.
>
> http://www.cs.northwestern.edu/~riesbeck/demo/ie-nowrap.html

In your actual source you have:

<label>
<input ...> text
</label>

I've found if you put the closing </label> tag right after the text
it gets as expected:

<label>
<input ...> text</label>

Probably bug in Opera but there may be another explanation.

--
Stanimir
From: Stanimir Stamenkov on
Wed, 07 May 2008 02:53:41 +0300, /Stanimir Stamenkov/:
> Tue, 06 May 2008 15:30:48 -0500, /Chris Riesbeck/:
>
>> What's the right way to make sure checkboxes stick with their labels
>> when the window is resized?
>>
>> Right now I'm trying <label><input ...> text</label> with
>> white-space:nowrap on label, but this only seems to work in Firefox
>> and IE 7.
>>
>> In IE 8 and Opera I get one long line, as if the nowrap applied
>> outside the label elements.
>>
>> In Safari for Windows, it groups the text with the checkbox on the
>> right instead of the left! That one I can't figure at all.
>>
>> http://www.cs.northwestern.edu/~riesbeck/demo/ie-nowrap.html
>
> In your actual source you have:
>
> <label>
> <input ...> text
> </label>
>
> I've found if you put the closing </label> tag right after the text it
> gets as expected:
>
> <label>
> <input ...> text</label>
>
> Probably bug in Opera but there may be another explanation.

Safari on Windows acts even more strange (with the original
example): it "groups" every check box with the text of the previous
label. Putting the closing </label> right after the text seems to
correct it with it, too. IE 6 seems o.k. in both cases.

--
Stanimir