Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping Text Together (No Line Breaks) 2

Status
Not open for further replies.

BoulderBum

Programmer
Jul 11, 2002
2,179
US
I want to keep all text within a certain span together in a flow layout (such that if any text goes to a new line, it all does). Is there an element or style or something that can help me accomplish this?
 
Put nowrap inside of the open-tag that surrounds the text (even if it's the BODY tag). I know this works in quirks mode on IE6. You might want to experiment some.

'hope this helps.

--Dave

--Dave

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
O Time, Strength, Cash, and Patience! [infinity]
 
Thanks, dude.

Looking into the nowrap attribute/marker lead me to the <NOBR> tag which ended up being easier to implement for my purposes, but I wouldn't have found it without ya!
 
<nobr> is somewhere between the worst and the worst option you could choose. Element was never part of any standards (except IE3) and you can actually expect a bunch of unexpected results using that tag. I would suggest nicely supported css solution for that:
Code:
white-space: nowrap;
More on that here:
 
Fortunately we're standardized on IE (it's an intranet app), but that is certainly the superior solution. Thanks man!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top