• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

Fixed width div streching with text instead of wrapping

I have a div that I styled the width to 600px.  When I enter a long string of text, instead of wrapping it @ 600px, it streches out.  I was originally trying to make the div stretch to the size of the page, but got the same results (text going off the screen).  A solution for either the fixed width or strech would be great.
1 Solution
Hi ibidata,

Can you please paste your code here.

ibidataAuthor Commented:
Let me know if you need more.


                  <!-- BEGIN PAGE CONTENT-->
                  <div id="pageContent">
                        ;asfdjkl;jkl;asfdjkl;asdjkfdakl;fja;dlfjl;kafjdadl;kfjal;jfdkl ;jafdfdasjklafdjklfdjkl;asfdasfdjkl
                        ;asfdjkl;asfdjkl;sfdjkl ;asfdjkl;asfdjkl;jkljkl;asfdjkl;jkl;asfdjkl;asdjkfdakl;fja;dlfjl;kaf  
                        kl;sfdjkl;asfdjkl;asfdjkl;jkljkl;asfdjkl; jkl;asfdjkl;asdjkfdakl;fja;dlfjl;kafjdadl;kfjal;jfdkl;jafdfd

                  <!-- END PAGE CONTENT-->

> When I enter a long string of text, instead of wrapping it @ 600px, it streches out.
It's called "overflow" and the default is "visible", which shows your overflowing content outside the container's bounderies.

Wrapping is for words.  If you have very long words, then split them into some smaller pieces... you can use the <wbr> element for that (that's not part of the w3 standards, but all browsers support it).

For an IE-only solution, you can use the css "word-wrap: break-word;":

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now