Oct 29th, 2002, 10:48 AM
#1
Thread Starter
Addicted Member
Text wrapping
I've got a list in HTML. This list lives in a frame, but when the frame is resized the text inside gets wrapped if the frame becomes too small.
Is there any way to disable text wrapping - if only 1 word can be seen in the frame then so be it.
HD
Oct 29th, 2002, 10:58 AM
#2
Frenzied Member
There a couple of ways with style. Whitespace is one:
Code:
<div style="white-space:nowrap;">Lots of text here</div>
And overflow
Code:
<div style="overflow:auto; width:100%;">Lots of text here</div>
Also you can use hidden for overflow, but that will result in no scroll bars.
Oct 29th, 2002, 03:31 PM
#3
There is a <nowrap> tag I think.
All the buzzt
CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Oct 30th, 2002, 04:50 AM
#4
Thread Starter
Addicted Member
I have tried <nowrap> but it doesn't seem to work.
Anyway, when I do the <div style=.....>Text</div>, the text doesn't wrap - but the list images do. The attachment is a screen shot of what I mean.
As you can see, the "Request Equipment" item has 'wrapped' from the list image.
Any way I can stop this?
HD
Attached Images
Oct 30th, 2002, 06:36 AM
#5
Frenzied Member
I'm pretty sure <nowrap> is proprietary. The style stuff may only work on block level elements (I'm not sure though), so if you're using for example a list item, try encasing it's text in a DIV and setting the style on that.
Oct 30th, 2002, 09:53 AM
#6
I'd rather use span, but I don't know where the difference would be.
All the buzzt
CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Oct 30th, 2002, 12:31 PM
#7
Frenzied Member
<span> is inline, so it would be the same as just <li> really, you want <div> because it's block.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width