Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-22-2005, 02:36 PM   PM User | #1
SeeIT Solutions
Regular Coder

 
Join Date: May 2005
Posts: 563
Thanks: 0
Thanked 3 Times in 3 Posts
SeeIT Solutions is on a distinguished road
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
__________________
Design Portfolio
SeeIT Solutions is offline   Reply With Quote
Old 05-22-2005, 02:43 PM   PM User | #2
mark87
Senior Coder

 
Join Date: Dec 2004
Location: Essex, UK
Posts: 2,636
Thanks: 0
Thanked 0 Times in 0 Posts
mark87 is on a distinguished road
word-wrap: break-word;

...should fix it. Think that's IE only though...?
mark87 is offline   Reply With Quote
Old 05-22-2005, 04:36 PM   PM User | #3
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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?
_Aerospace_Eng_ is offline   Reply With Quote
Old 05-22-2005, 08:49 PM   PM User | #4
mark87
Senior Coder

 
Join Date: Dec 2004
Location: Essex, UK
Posts: 2,636
Thanks: 0
Thanked 0 Times in 0 Posts
mark87 is on a distinguished road
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>
mark87 is offline   Reply With Quote
Old 05-22-2005, 09:03 PM   PM User | #5
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Of course not, that word is huge, why on earth would someone put in a word that huge?
_Aerospace_Eng_ is offline   Reply With Quote
Old 05-22-2005, 09:24 PM   PM User | #6
mark87
Senior Coder

 
Join Date: Dec 2004
Location: Essex, UK
Posts: 2,636
Thanks: 0
Thanked 0 Times in 0 Posts
mark87 is on a distinguished road
No idea... but SeeIT Solutions' word has to be longer than 750px's...
mark87 is offline   Reply With Quote
Old 05-22-2005, 11:08 PM   PM User | #7
mrruben5
Regular Coder

 
Join Date: Nov 2004
Location: The Netherlands
Posts: 551
Thanks: 0
Thanked 0 Times in 0 Posts
mrruben5 is an unknown quantity at this point
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"
mrruben5 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:13 AM.


Advertisement
Log in to turn off these ads.