473,671 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 " &nbs p;", 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 2754
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
1724
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 about the LEFT, MID, and RIGHT properties, but I don't believe they'll work in this case. Anyway: I have an ASP page where I retrieve data off of a database recordset...something like:
0
685
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 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 "&nbsp;&nbsp;", between items (as well as...
87
6393
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 line..) (searched for 'hyphen' in FAQ pg, didn't find anything..) thank you.. Frances
4
1675
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 have a field "codes2" that's defined as char(8) that we use to keep eight different codes (i.e. codes2 = something, codes2 = something else, etc.). I'm sure that idea is nothing new to anyone but our problem arises when we try to store two spaces ('...
2
1744
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 readable by indenting it, but it annoys me intensely. Apart from anything else, it causes extra line wrap as the spaces make the line too long to fit in the window. Can I switch off this, erm "feature"? I haven't found a way yet. Please put me out...
8
3280
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 custom control? I would like the spaces to be at the front end of the string " xxxxx". In vs.net I am doing a listitem(string) Any Help is appreciated. thanks barry
10
1330
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
25032
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 white spaces get deleted when i store them into a mysql database example there is a space at the begining of this line and there are two spaces between those words i can't seem to get them to display after i pull them from the database now i...
5
1746
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 like this: var ct9000 = document.getElementById("ct9000").value; var enddate = document.getElementById("105end").value; var fileloc = "file:///S:\folder1\folder2\folder - 3 \document.doc'"; var body_message = "Please run "+job+", details as...
0
8472
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8390
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8909
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8596
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8667
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4221
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2806
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1801
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.