473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

Jul 20 '05 #1
1 2738
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
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

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Thomas Brooks | last post by:
Hi everybody.... Here's a question for you. I think the answer is simple, but I'm not sure how to go about it...what I want to do is to break down a string into components. I already know...
0
by: Chris Sharman | last post by:
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...
87
by: Frances Del Rio | last post by:
is there a non-breaking hyphen in HTML?? for example, so a phone no. falls all on one line.. as in.. 1-800-444-5454... (and is not broken into two lines if phone no. occurs near end of a...
4
by: Mesan | last post by:
Here's the question: How do you get DB2 to update a char(n) field with multiple spaces right next to each other without having the additional spaces being omitted? Here's the background: We...
2
by: Alan Silver | last post by:
Hello, VWD Express seems obsessed with inserting loads of spaces at the start of each line whenever you drag controls into the source view. I guess this is MS' idea of making the source code...
8
by: barry | last post by:
Have tried a number of things including space(n) in front of the string but when the DropDownList is shown the spaces have apparently been trimmed. Is this something that would have to be done in a...
10
by: Drew | last post by:
I'm looking to add an element to list of items, however I'd like to add it at a specific index greater than the current size: list = list.insert(10,4) What I'd like to see is something like:
2
tolkienarda
by: tolkienarda | last post by:
hi all i writing a script where people can write atricles and the formating must save white space and break lines. the breakline problem has been fixed but about the whitespace problem. do extra...
5
by: plumba | last post by:
Ok, the title might not make it clear. I have a javascript code which generates an email. The page is on our corporate intranet so I know it will fire up the email ok. the code looks something...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.