• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 253
  • 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;":
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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