Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 10:20 PM
Chris Sharman
Guest
 
Posts: n/a
Default inserting breaking spaces

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

Eg:
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) ?

Thanks,
Chris

  #2  
Old July 20th, 2005, 10:21 PM
Jukka K. Korpela
Guest
 
Posts: n/a
Default Re: inserting breaking spaces

Chris Sharman <chris.sharman@sorry.nospam> wrote:
[color=blue]
> Writing a form, several questions have got a list of checkboxes,
> with associated descriptions (mostly one word), all on a line.[/color]

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
http://www.cs.tut.fi/~jkorpela/forms/choices.html#assoc

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).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles