Reputation: 893
On my new site www.unicmedia.nl/case/oranje i have a problem with my floats. In IE they work (for the first time lol) but FF and CH are way off.
I tried literally everything but can't seem to find the problem. My css code is valid according to the w3c validator.
Hope you guys can find something that is wrong!
Upvotes: 0
Views: 488
Reputation: 6857
The div with id=content=right should have some width. Please set it to 600px.
Note that a parent element should float if one of its child elements floats. Thats is why the div#content appears outside its children. To make the parent element not float you can use the clearfix hack.
http://www.positioniseverything.net/easyclearing.html
Upvotes: 1
Reputation: 2897
Looking at that page, I see a div
with the class content-left
. It looks floated left, but it's also got 25px of margin-left. Is that what you mean by "way off"?
Your content-right div is also floated left. Are you trying to make two columns? The problem might be that your right content has so much information that it's trying to be full-width so not floating. If you force it to be a specific number of pixels or percent, that should make that work. Try making your content-left width: 20%
and your content-right width:80%
.
Better yet, start with someone else's cross-browser column layout.
Upvotes: 0