• 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.
0
ibidata
Asked:
ibidata
1 Solution
 
jagadeesh_motamarriCommented:
Hi ibidata,

Can you please paste your code here.


____Jags.
0
 
ibidataAuthor Commented:
Let me know if you need more.

#pageContent{
      width:600px;
      
      }

<td>
                  <!-- BEGIN PAGE CONTENT-->
                  <div id="pageContent">
                        fdasjklafdjklfdjkl;asfdasfdjkl;asfdjkl;asfdjkl;sfdjkl;asfdjkl;asfdjkl;jkljkl
                        ;asfdjkl;jkl;asfdjkl;asdjkfdakl;fja;dlfjl;kafjdadl;kfjal;jfdkl ;jafdfdasjklafdjklfdjkl;asfdasfdjkl
                        ;asfdjkl;asfdjkl;sfdjkl ;asfdjkl;asfdjkl;jkljkl;asfdjkl;jkl;asfdjkl;asdjkfdakl;fja;dlfjl;kaf  
                        jdadl;kfjal;jfdkl;jafdfdasjklafdjklfdjkl;asfdasfdjkl;asfdjkl;asfdjkl;sfdjkl;asfdjkl;asfdjkl;jk
                        ljkl;asfdjkl;jkl;asfdjkl;asdjkfdakl;fja;dlfjl;kafjdadl;kfjal;jfdkl;jafdfdasjklafdjklfdjkl;asfdasf
                        djkl;asfdjkl;asfdjkl;sfdjkl;asfdjkl;asfdjkl;jkljkl;asfdjkl;jkl;asfdjkl;asdjkfdakl;fja;dlfjl;kafjdadl;
                        kfjal;jfdkl;jafdfdasjklafdjklfdjkl;asfdasfdjkl;asfdjkl;asfdjkl;sfdjkl;asfdjkl;asfdjkl;jkljkl;asfdjkl;
                        jkl;asfdjkl;asdjkfdakl;fja;dlfjl;kafjdadl;kfjal;jfdkl;jafdfdasjklafdjklfdjkl;asfdasfdjkl;asfdjkl;asfdj
                        kl;sfdjkl;asfdjkl;asfdjkl;jkljkl;asfdjkl; jkl;asfdjkl;asdjkfdakl;fja;dlfjl;kafjdadl;kfjal;jfdkl;jafdfd
                        asjklafdjklfdjkl;asfdasfdjkl;asfdjkl;asfdjkl;sfdjkl;asfdjkl;asfdjkl;jkljkl;asfdjkl;jkl;asfdjkl;asdjkfda
                        kl;fja;dlfjl;kafjdadl;kfjal;jfdkl;jafd
                  

                  
                  </div>
                  <!-- END PAGE CONTENT-->

            </td>
0
 
GrandSchtroumpfCommented:
> 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.
http://www.blooberry.com/indexdot/css/properties/position/overflow.htm

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;":
http://www.blooberry.com/indexdot/css/properties/text/wordwrap.htm
0

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