By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,625 Members | 2,261 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,625 IT Pros & Developers. It's quick & easy.

inserting breaking spaces

P: n/a
Writing a form, several questions have got a list of checkboxes, with
associated descriptions (mostly one word), all on a line.

Describe yourself: []Fat []Hairy []Ugly []Wears glasses.

I want to prevent the description word(s) from being separated from
their box (represented here as "[]"). I want to insert some spacing
between items, so that it's clear the third box means ugly, not hairy -
I've used "  ", between items (as well as a normal space
and/or carriage return, and " " in multiword descriptions.

Works in ie, but moz seems disinclined to break at the 'normal space'
before the checkbox, preferring to break after the checkbox - exactly
where I don't want it.

I have a suspicion that normal whitespace adjacent to   is being
(correctly?) ignored. I tried inserting zero-width spaces (#&x200b;),
but that didn't help.

Can anyone tell me the 'right' way to do this (either html or css) ?


Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Chris Sharman <ch***********@sorry.nospam> wrote:
Writing a form, several questions have got a list of checkboxes,
with associated descriptions (mostly one word), all on a line.

Well, don't do that.

What was the point of posting to one group (.html) and setting
followups to another (.stylesheets)? You seem to have generated two
independent threads, since people have posted responses to both groups.
I'm trying to fix what I can by crossposting and setting followups
to .html only.

The short answer is: put one field along with its label on one line.
Problem solved. Or, rather, not created in the first place. And you
avoid creating some other problems too, see

If you put several fields on one line, you indeed encounter the line
breaking problems. And there's really nothing specified about browser
behavior as regards to treating form fields as "inline elements", i.e.
whether a line break is permitted or not. Moreover, IE is known to fail
to honor no-break space character semantics at times. Using CSS to
prevent line breaks is uncertain at best, and the white-space property
by definition affects white space only, not e.g. line breaks between a
word and an input field (though it might have other effects too, on
some browsers).

Pages about Web authoring:

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.