stopping word wrapping...

liunx

Guest
If I create a simple HTML page that has 80 words accross, and the user makes the browser window a smaller width I would like the scroll bar at the bottom to display/grow without the words wrapping staying in the size of the browser...<br />
<br />
How can I do this?<br />
<br />
Thanks in advance,<br />
<br />
<br />
John<!--content--><div style="white-space:nowrap;">a lot of text ...<div><!--content-->That worked!!<br />
<br />
But does it require a certain browser???<br />
<br />
I have a computer with IE5 and only a 640X400 display and it still wraps depending on the size of the users screen..<br />
<br />
Thanks,<br />
<br />
John<!--content-->is it IE 5.0? (as opposed to 5.5)<br />
<br />
Newer browsers will support it, some of your older ones may not.<br />
<br />
If you really need it to work everywhere you could try <br />
<br />
<pre>text in here</pre><br />
<br />
though that's not as good as Fang's way.<!--content-->Could I use both???<br />
i.e.:<br />
<br />
<div style="white-space:nowrap;"><br />
<pre><br />
A lot of text....<br />
</pre><br />
</div><br />
<br />
Or should I be looking at creating the webpage with something else???<br />
<br />
<br />
Thanks,<br />
<br />
<br />
John<!--content-->white-space (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/text.html#white-space-prop">http://www.w3.org/TR/REC-CSS2/text.html ... space-prop</a><!-- m -->) is part of CSS2, so any browser that has resonable support for CSS2 should support it.<br />
<br />
In the old days, one would have had to use nowrap (<!-- m --><a class="postlink" href="http://www.w3.org/TR/html401/struct/tables.html#adef-nowrap">http://www.w3.org/TR/html401/struct/tab ... def-nowrap</a><!-- m -->) (applies to TH and TD) to do this. That property has, however, been depreciated, and as such, should not be used...<!--content-->Sorry PYRO but not to sound like an idiot, but what?<br />
<br />
I didn't really understand anything you wrote...<br />
<br />
I am fairly new to html, and I should have known better than to help my wife with her webpage... But when she saw the words not showing exactly how she typed them in Word2000 she snapped...<br />
<br />
I really can't say anything to her, so here I am.<br />
<br />
Thanks for all your help,<br />
<br />
John<!--content-->Umm... I'm hoping your not trying to use M$ Word to export the page as a HTML page. If you are, you might as well use any code you can find, as nothing you could do to the code would make it any worse than what Word does all by itself.<br />
<br />
Anyway, nowrap was the old presentational hack method keeping text from wrapping (again, only applicable to <th> and <td>).<br />
<br />
The solution to your problem might just be to set a width on the container of the content (be it a div, table, or something else).<!--content-->Okay thanks, I will try that and see what happens.<br />
<br />
John<!--content-->
 
Back
Top