471,627 Members | 2,330 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

text inside div box will not wrap

348 100+
Hi all,

I am new to the CSS part of this forum and usually spend all of my time on the php side. CSS is not my strong point and I am having an issue with a div box where my text will not wrap in firefox. The text wraps just fine in IE6.

Here is the css code
Expand|Select|Wrap|Line Numbers
  1.  #ta    {padding: 5px; height: 350px; width: 420px; border: thin inset #cccccc; font-size: 11px; overflow: scroll;} 
I have a table inside of the div box and the contents within the <td> tags will not wrap at around 420px. Can someone please lend a hand as to how to get this to play nice in ff?


Sep 1 '07 #1
3 15053
7,435 Expert 4TB
At first you say you have a div with text that won't wrap, then you say it's text in a td inside a table inside a div that won't wrap. Without the complete code or a link, we can only guess.
Sep 1 '07 #2
348 100+
Sorry that it wasn't clear.

Here is the css in the stylesheet
Expand|Select|Wrap|Line Numbers
  1.  #ta    {padding: 5px; height: 350px; width: 420px; border: thin inset #cccccc; font-size: 11px; overflow: scroll;} 
Here is the html
Expand|Select|Wrap|Line Numbers
  2. <div id="ta">
  3. <table cellspacing="0" cellpadding="0" width="95%" border="0">
  4. <tr valign="top" align="left">
  5.     <td><strong>my really really long paragraph goes here. IT WILL NOT WRAP WITHIN THE DIV HOWEVER</strong></td>
  6. </tr>
  7. </table>
  8. </div>
Thanks again
Sep 1 '07 #3
348 100+
I figured it out.

The text within the div wraps just fine but I noticed that I had a "nowrap" outside the table that was causing the text to display in a straight line. It was doing exactly what it was supposed to. :)

Thanks for the help..

Sep 1 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Robert Nicholson | last post: by
7 posts views Thread by Roderik | last post: by
5 posts views Thread by paii, Ron | last post: by
6 posts views Thread by Markus Ernst | last post: by
6 posts views Thread by Tina | last post: by
11 posts views Thread by C.W.Holeman II | last post: by
10 posts views Thread by gaetanoortisi | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.