3 replies [Last post]
srini_ge
Offline
newbie
USA
Last seen: 7 years 27 weeks ago
USA
Joined: 2007-02-13
Posts: 2
Points: 0

Below is my select, I need multiple spaces in the display string to be retained as is, however OPTION removes multiple spaces and replaces with one space, how can I use stylesheet to retain the multiple spaces?

steam turbine


resistor arra y
widget analyzer
fiber identifier

Your help is appreciated.

srini_ge
Offline
newbie
USA
Last seen: 7 years 27 weeks ago
USA
Joined: 2007-02-13
Posts: 2
Points: 0

herez the option tag

Below is my select, I need multiple spaces in the display string to be retained as is, however OPTION removes multiple spaces and replaces with one space, how can I use stylesheet to retain the multiple spaces?
In the example, simply treat "sssssss" as 7spaces

steam sssssss turbine
resistor arra y
widget analyzer
fiber identifier

Your help is appreciated.

jimmygoon
Offline
Regular
Last seen: 7 years 27 weeks ago
Joined: 2005-08-04
Posts: 45
Points: 0

you have lots of options:

you have lots of options:

a simple one would be to wrap the second,third,etc words in a <span> and then style it to have a padding-left: "7px" or something like that.

It would be wrong of me to mention   non-breaking spaces to space your content apart...

example:

steam turbine
resistor arra y
widget analyzer
fiber identifier

Kravvitz
Offline
Enthusiast
USA
Last seen: 44 weeks 1 day ago
USA
Timezone: GMT-4
Joined: 2006-10-02
Posts: 56
Points: 3

An <option> element may not

An <option> element may not have any elements inside it.

Try using non-breaking spaces to add extra space. If you need more formatting than that, you will need to use radio buttons or checkoxes instead of a <select> element.

Code for FF (and/or Opera), apply fixes for IE, not vice versa.
Dynamic Site Solutions