Current location: Hot Scripts Forums » General Web Coding » CSS » Div wrapping trouble


Div wrapping trouble

Reply
  #1 (permalink)  
Old 11-18-06, 11:35 AM
djhlhn's Avatar
djhlhn djhlhn is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Div wrapping trouble

I can't figure out a good way to wrap text in a div with a fixed width...This text just keeps on going. I can probably wrap it around in a table, but I would prefer not to. I tried a word-break:break-all....to no avail. Any suggestions? Here's a link to my problem child:
http://live-la.com/showdescription.php?listingid=32
Reply With Quote
  #2 (permalink)  
Old 11-19-06, 06:11 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
try display:block
you could also set margins: margin-bottom, margin-top, margin-left and margin-right

also take a look at http://www.w3schools.com/css/default.asp

UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
  #3 (permalink)  
Old 11-20-06, 11:42 AM
djhlhn's Avatar
djhlhn djhlhn is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Well...margins don't really apply to this situation, I'm trying to wrap the text to a newline in the html. This would be helpful in other cases, but it doesn't apply to a div The bounds of the div are set with width:100px or whatever, I just want the text to wrap to a newline once it hits that 100px.
Reply With Quote
  #4 (permalink)  
Old 11-27-06, 01:32 PM
jfulton's Avatar
jfulton jfulton is offline
Community VIP
 
Join Date: Apr 2006
Location: Los Angeles, CA
Posts: 660
Thanks: 0
Thanked 0 Times in 0 Posts
I'm not seeing any limitations on the width of the div. I think your problem is the table. The outermost table is actually 1427px wide (on my screen) and everything is expanding to that. I think you need to specify widths on the individual table cells. I could be wrong about how to 'style' tables for layout, but if you are going to keep that table, I would play around with the table cell and row widths, not just the width of the whole table.

If I get a chance later I'll try to figure out why this happens.
Reply With Quote
  #5 (permalink)  
Old 12-04-06, 10:47 AM
djhlhn's Avatar
djhlhn djhlhn is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
That's what I figured too, It's very doable in a table row, but I didn't know if it was impossible for a standalone div to do it, which it probably isn't(according to my research).
Thanks for the input, jfulton.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Div Scrolling dwoody CSS 2 12-28-06 07:59 PM
Can't Understand java script maverickminds JavaScript 1 07-16-06 01:23 PM
EZ Div Toggle Question AnicoJoe JavaScript 1 05-30-06 07:06 PM
expanding a div to keep image contained pukington HTML/XHTML/XML 0 12-26-05 08:04 AM
CSS Div problem themanmathias CSS 1 09-29-05 08:05 PM


All times are GMT -5. The time now is 01:57 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.