Enjoy an ad free experience by logging in. Not a member yet?
Register .
05-22-2005, 02:36 PM
PM User |
#1
Regular Coder
Join Date: May 2005
Posts: 563
Thanks: 0
Thanked 3 Times in 3 Posts
div stretching with text with no space
Hi,
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.
Thanks
05-22-2005, 02:43 PM
PM User |
#2
Senior Coder
Join Date: Dec 2004
Location: Essex, UK
Posts: 2,636
Thanks: 0
Thanked 0 Times in 0 Posts
word-wrap: break-word;
...should fix it. Think that's IE only though...?
05-22-2005, 04:36 PM
PM User |
#3
Supreme Master coder!
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
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
PM User |
#4
Senior Coder
Join Date: Dec 2004
Location: Essex, UK
Posts: 2,636
Thanks: 0
Thanked 0 Times in 0 Posts
Nope even with a fixed width, the DIV will expand when the content does not fit in it.
eg.
Code:
<html>
<head>
<style type="text/css">
#main { width: 200px; background-color: #DDD }
</style>
</head>
<body>
<div id="main">
superlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtextsuperlongtext
</div>
</body>
</html>
05-22-2005, 09:03 PM
PM User |
#5
Supreme Master coder!
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
Of course not, that word is huge, why on earth would someone put in a word that huge?
05-22-2005, 09:24 PM
PM User |
#6
Senior Coder
Join Date: Dec 2004
Location: Essex, UK
Posts: 2,636
Thanks: 0
Thanked 0 Times in 0 Posts
No idea... but SeeIT Solutions' word has to be longer than 750px's...
05-22-2005, 11:08 PM
PM User |
#7
Regular Coder
Join Date: Nov 2004
Location: The Netherlands
Posts: 551
Thanks: 0
Thanked 0 Times in 0 Posts
You should be using a server side script for this, this is about content, not design...
__________________
CATdude about IE6: "All your box-model are belong to us"
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 12:13 AM .
Advertisement
Log in to turn off these ads.