Cooper94 Posted November 22, 2009 Share Posted November 22, 2009 The width works fine on the first div and it cuts of thetext when it reachs 520 but in the second div it keeps going. If you have any suggestins I would be very greatful! Thank you Code Below: <div style="width: 520px;"> Welcome msg to go here!Welcome msg to go here!Welcome msg to go here!Welcome msg to go here!Welcome msg to go here! Welcome msg to go here!Welcome msg to go here!Welcome msg to go here!Welcome msg to go here!Welcome msg to go here! Welcome msg to go here!Welcome msg to go here!Welcome msg to go here!Welcome msg to go here!Welcome msg to go here! </div> <div style="width: 20%;"> testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest </div> Quote Link to comment Share on other sites More sharing options...
sKunKbad Posted November 22, 2009 Share Posted November 22, 2009 overflow:hidden; Quote Link to comment Share on other sites More sharing options...
FaT3oYCG Posted November 22, 2009 Share Posted November 22, 2009 If a string is very long then the browser will put the next words on a new line, do you know of any word that is 520 characters long? Quote Link to comment Share on other sites More sharing options...
cags Posted November 22, 2009 Share Posted November 22, 2009 [ot]The longest word I know is smiles, theres a mile between the two s's. Sorry just wanted to make use of the new tag [/ot] Quote Link to comment Share on other sites More sharing options...
Cooper94 Posted November 22, 2009 Author Share Posted November 22, 2009 The overflow wored but it just earses it after it reaches that point. Is it possible to have it go to another line and continue the text? Thnk You Quote Link to comment Share on other sites More sharing options...
FaT3oYCG Posted November 22, 2009 Share Posted November 22, 2009 You would have to create your own function to put line breaks in. Quote Link to comment Share on other sites More sharing options...
jcombs_31 Posted November 24, 2009 Share Posted November 24, 2009 Why not just try using real data, what are the chances you will have a string that long with no space? Otherwise you have to do as FaT3oYCG said and create a string function to break it up after so many characters. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.