473,398 Members | 2,427 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,398 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 2741
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.