Click here to get back home

nobr

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
nobr Jeff 04-09-2006
---> Re: nobr Steve Pugh04-09-2006
| `--> Re: nobr Jukka K. Korpel...04-09-2006
`--> Re: nobr dwight.stegall04-10-2006
Get Chitika Premium
Posted by Jeff on April 9, 2006, 3:44 am
Please log in for more thread options


I have a series of radio buttons with a "label" to the right. I don't
want the label to break from the radio button when the line wraps and I
want each label/button pair to take the same space.

Something like this comes to mind:

nobr{width: 8em}

<nobr><input type="radio" ...> $5.00</nobr>


Seems to me that nobr never made it into and html specs, or am I wrong?

Also, is it OK to specify widths, horizontal margins and padding for
inline elements?

Better way?

this also comes to mind:
<span><input type="radio" ...>&nbsp;$5.00</span>

Jeff

Posted by Steve Pugh on April 9, 2006, 5:01 am
Please log in for more thread options



>I have a series of radio buttons with a "label" to the right. I don't
>want the label to break from the radio button when the line wraps and I
>want each label/button pair to take the same space.
>
>Something like this comes to mind:
>
>nobr{width: 8em}
>
><nobr><input type="radio" ...> $5.00</nobr>
>
>
>Seems to me that nobr never made it into and html specs, or am I wrong?
>
>Also, is it OK to specify widths, horizontal margins and padding for
>inline elements?
>
>Better way?
>
>this also comes to mind:
><span><input type="radio" ...>&nbsp;$5.00</span>

How about <label> ? It was designed for the purpose of markin up form
control labels. Seems to be exactly what you're doing.

        Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor


Posted by Jukka K. Korpela on April 9, 2006, 6:23 am
Please log in for more thread options


Steve Pugh wrote:

> How about <label> ? It was designed for the purpose of markin up form
> control labels. Seems to be exactly what you're doing.

It's useful for other purposes, but it doesn't prevent line breaks.

For a set of radio buttons, the structured way is something like

<fieldset>
<legend>Select the amount of donation</legend>
<div><input id="a1" type="radio" ...> <label for="a1">$5.00</label></div>
<div><input id="a2" type="radio" ...> <label for="a2">$6.00</label></div>
<div><input id="a3" type="radio" ...> <label for="a3">$7.00</label></div>
</fieldset>

Then you can set
fieldset { white-space: nowrap; }

It would suffice to use &nbsp; instead of a space, but in a general
case, the label text could contain several spaces, making this
impractical, or hyphens, making this insufficient.

As regards to making the fields fit into, say, 8em, the best approach is
to avoid creating such problems. Put a form on a page of its own where
it can occupy the entire available width.

Posted by Jim Moe on April 9, 2006, 2:10 pm
Please log in for more thread options


Jeff wrote:
> I have a series of radio buttons with a "label" to the right. I don't
> want the label to break from the radio button when the line wraps and I
> want each label/button pair to take the same space.
>
> Something like this comes to mind:
>
> nobr{width: 8em}
>
This makes no sense. <nobr> is a directive to prevent line wrapping. It
has no dimensions, just as <br> or <em> has no dimensions.
As others have mentioned, a <fieldset> and <label>s look like what you
should be using.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)

Posted by dwight.stegall on April 10, 2006, 3:07 pm
Please log in for more thread options


nobr will not validate. use CSS white-space:nowrap;


Similar ThreadsPosted
Re: nobr tag July 5, 2008, 11:15 am
Re: nobr tag July 5, 2008, 2:53 pm
Re: nobr tag July 6, 2008, 5:59 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap