2 replies [Last post]
earph
earph's picture
Offline
Enthusiast
Austin, TX
Last seen: 13 years 28 weeks ago
Austin, TX
Joined: 2003-11-12
Posts: 62
Points: 0

I have some simple floated div columns, but the widths are getting jacked up because the text is pushing them out instead of wrapping. It's worked fine for me 20 times before, but it's just not working for some reason.

Here are my files:

http://www.earph.com/lansing/test.html
http://www.earph.com/lansing/test.css

I appreciate any suggestions you might have.

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 18 years 46 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

Simple Floated Columns Not Working

A simple way to stop it - add overflow: hidden; to you divs.

IE will then keep the boxes at the width and height you set.

For some reason I also think there may have been another method, but can't remember - Anyone else??

Regards
Day

The only way to learn is to do it yourself

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 3 years 47 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Simple Floated Columns Not Working

Hi

<!--[if IE]>
<style type="text/css" media="screen">
/*** The rule below prevents long urls from widening floated cols and breaking the layout
     in IE. It is not W3C valid, but if placed within a "Conditional comment" it will be hidden
     from all user agents other than IE/Win, and thus validate. This fix fails in IE5/Win.
     http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp ***/
.outer{word-wrap:break-word;}
</style>
<![endif]-->

Borrowed from www.positioniseverything.net (thanks to Big John)

Trevor