473,837 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

text inside div box will not wrap

348 Contributor
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 15307
7,435 Recognized Expert Expert
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 Contributor
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 Contributor
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

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

Similar topics

by: black tractor | last post by:
HI there.. l was just wondering, if l place a "table" in the "editable region" of my template, will the text, graphics placed inside the this "table" MOVE BY ITSELF?? l mean, recently l had a "table" insert in my "editable region", have it placed in the "center" of the page.. while it display correctly on my browser, with setting at 1024x768 (IE6),
by: Robert Nicholson | last post by:
So I've got one page where I have an image inside a DIV with text-align: center and the image is correctly centered in that block. Making me think that text-align will center the contents of a block. Another page I have a series of thumbnails which are themselves a DIV block wrapping both an image and a caption (float: left) inside a DIV block with a fixed width which is smaller than the width of the browser and that DIV block is in...
by: Roderik | last post by:
Hi, When I use <pre> inside my <td> cells, the text won't flow to a new line and the table gets to large in width. This will appear in Firefox this way, Internet Explorer will wrap the lines, like I want, by default. Any idea what I should define to make firefox wrap the text inside the pre? <table><tr><td><pre>this is unwrapped in firefox</pre></td></tr>....<table> regards,
by: paii, Ron | last post by:
Is there a setting to not word wrap text on a unbound text box. in A97?
by: Markus Ernst | last post by:
Hi Searching for a possibility to display some text with preserved white space and line breaks, but with long lines being wrapped, I found this CSS declaration, which I found helpful: pre { white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */
by: Tina | last post by:
I have a text file perfectly formatted with carriage returns, indents, spacing etc in NotePad. I want to put text that looks exactly like that into a <divand get it formatted exactly the same way in Visual Studio. But I can't seem to get this done in Visual Studio other than pasting it into a textbox - which I don't want to do. If I paste it into a div in design view it removes all formatting. Same in source view. If I put it into MS...
by: C.W.Holeman II | last post by:
I what to hide an input element and the following text. I have the selector for the input working and just need to grab the text following it. CSS: form{ display:table; text-align:center; }
by: gaetanoortisi | last post by:
Hello, can anyone point me to some piece of code that do text justification of fixed fonts like those that nroff do on manpages? Thanks, Gaetano
by: Stevo | last post by:
I've found that for IE6+, if you add the property text-align:center to a DIV, then *anything* inside it gets centered. That can be a table, an object/embed, another DIV, an image, or some text. Firefox and Safari on the other hand don't treat text-align in that way. In my tests on those browsers, they only centers images and text. Any DIVs, object/embeds or tables remain default unaligned and generally appear on the left. Considering...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.