nowrap effect in css?

D

dorayme

nowrap is deprecated in HTML 4.01 What are folk using to achieve
the same effect in a table cell for some text; for example, a
column of phone numbers that one does not want wrapped. I think I
am asking if there is any specific equivalent rather than any
workarounds like 08 531 5555 or giving plenty of cell
width in px or ems. Seem to have forgotten or don't know?
 
N

Neredbojias

To further the education of mankind, dorayme
nowrap is deprecated in HTML 4.01 What are folk using to achieve
the same effect in a table cell for some text; for example, a
column of phone numbers that one does not want wrapped. I think I
am asking if there is any specific equivalent rather than any
workarounds like 08 531 5555 or giving plenty of cell
width in px or ems. Seem to have forgotten or don't know?

Css.

td {
white-space:nowrap;
}
 
D

dorayme

To further the education of mankind, dorayme


td {
white-space:nowrap;
}

Yes, thanks...

(I was not finding it in my index of the HTML version of the css
standard - some such address as /css2Standards/indexlist.html on
my local copy. It was under w and then 'white-space' And becoming
impatient... I now realise there are better ways to search. It is
always easier to solve a puzzle if you know there is a solution.)

OK Boji, I have had a word with Officer White and he is going to
give you a slightly easier treatment.
 
N

Neredbojias

To further the education of mankind, dorayme
Yes, thanks...

'Welcome, maam.
(I was not finding it in my index of the HTML version of the css
standard - some such address as /css2Standards/indexlist.html on
my local copy. It was under w and then 'white-space' And becoming
impatient... I now realise there are better ways to search. It is
always easier to solve a puzzle if you know there is a solution.)

True, and it's not always so easy to find things in the css spec, anyway.
If it isn't indexed, shalzbut!
OK Boji, I have had a word with Officer White and he is going to
give you a slightly easier treatment.

Officer White
Gives me no fright
For I can run
Like a son-of-a-gun.
 
T

Toby Inkster

dorayme said:
nowrap is deprecated in HTML 4.01 What are folk using to achieve
the same effect in a table cell for some text

As Neredbojias said, "white-space:nowrap". *However* remember CSS is for
optional presentational niceties -- if your non-breaking space is
important to you (and your users), then use " ".
 
D

David Dorward

Toby said:
As Neredbojias said, "white-space:nowrap". *However* remember CSS is for
optional presentational niceties -- if your non-breaking space is
important to you (and your users), then use " ".

And don't consider it a workaround - its pretty much what non-breaking
spaces were designed for.
 
D

dorayme

Toby Inkster said:
As Neredbojias said, "white-space:nowrap". *However* remember CSS is for
optional presentational niceties -- if your non-breaking space is
important to you (and your users), then use " ".

Well, I suppose, if I was to bet, I would say "optional
presentational" was odds on in my case. There are even advantages
to a phone number wrapping - to take one of my cases - like
putting off the time a horiz scrol bar will appear. But, on the
other hand, I prefer, and probably most others would prefer,
other things in the row to wrap instead, like addresses.

I have many tables of information that fill whole pages. They
look just as beautiful now as they did before. There are many
different techniques to be considered. I am ashamed to mention
the one I actually used - alt.html has given me a conscience and
it preyed on it till the pressure forced a change. I used to have
a swashbuckling nature and you lot have killed my spirit.

I recently did stick   between things like phone number
parts (08  5375 9486) and no need for col width of
any kind. A refinement being to just do it to one phone number
(any one in the col will do) and the rest of the 8 digit numbers
on each row never wrap, the one that has been set via  
forces the issue all on it own because of <g> the magic of
tables</g>.

Then I thought, no, surely nowrap. This I have done in one little
line in a css sheet to a class. One (any) item in the col of
phone numbers (to take a case) gets the class and this forces the
width for the rest. I was well pleased and feeling very goody
goody and then you come along and throw a doubt in the works!

But you now make me reflect on what is an important (not at all
optional presentational) need for no wrapping. If a picture
wrapped, it would be important to tell it to nowrap because where
would one put in &nbsp;? True, this is silly. OK, thinking
further aloud, an important use of no breaking space?

I remember an interesting thread a while ago about an h1 and a
need to break (and go into smaller text on the next line - I
think?). A sort of mirror image of the issue here in a way. And
was a bit miffed about the fundamentals behind it though it was
clear enough what to do in practice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top