View Full Version : div stretching with text with no space

SeeIT Solutions
05-22-2005, 02:36 PM

I have a div set to width 750px is there a way to make it wrap a word that is too long if it is entered? at the moment it is just stretching and looking terrible.


05-22-2005, 02:43 PM
word-wrap: break-word;

...should fix it. Think that's IE only though...? :o

05-22-2005, 04:36 PM
Well wait, if its a div set to a fix width, it should go to the next line. It would be helpful if we saw your code! I don't know how many times I have told that to people on these forums. How do you expect us to give you a good answer rather than us just guessing?

05-22-2005, 08:49 PM
Nope even with a fixed width, the DIV will expand when the content does not fit in it.


<style type="text/css">
#main { width: 200px; background-color: #DDD }
<div id="main">
superlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlong textsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuper longtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtext

05-22-2005, 09:03 PM
Of course not, that word is huge, why on earth would someone put in a word that huge?

05-22-2005, 09:24 PM
No idea... but SeeIT Solutions' word has to be longer than 750px's... :eek:

05-22-2005, 11:08 PM
You should be using a server side script for this, this is about content, not design...

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum