tags:

views:

30

answers:

1

Hello there!

I have a simple layout which works fine in Chrome, Safari even Opera too (OS X). The surprise for me here is Firefox. (IE and Win not tested yet).

The problem is fieldset.ownerbox isn't floating in Firefox. (The two semi-transparent fieldset below the pie-chart)

CSS rules applied here:

#owners {
position: relative;
width: 940px;
left: 0px;
margin-left: 0px;
z-index: 1;
top: -240px;
font-size: 16px;
}
.ownerbox {
width: 310px;
height: 150px;
padding: 10px;
margin-right: 20px;
float: left;
background: rgba(255,255,255,0.5);
color: #000;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}
.ownerbox.large {
width: 500px;
padding: 0px 10px 20px 10px;
}

Please help, what's wrong with my approach?

+1  A: 

Readjust your widths so it takes padding into account. You can overflow-x:hidden; on #owners to see how it looks "contained".

Alternatively adjust the width on #owners.

Edit: Seems you just need to clear:both on #owners.

meder
When i set overflow: auto; on #owners Firefox renders layout correctly except that the pie-chart clips on top and bottom.
fabrik
The floated list above #owners made this?? Thank you!
fabrik
You shouldn't be using `top:-240px` and `position:relative` as you are. I think you need to adjust your layout to not rely so much on relative positioning. If you have lots of cases like that, it's a bad sign and usually means go back, kill the position relatives and find another way of layout.
meder
Did you mean it's unnecessary to use pos: relative in this layout? Can i achieve the same with floats? Normally i'm using floats mostly but this time i tried this out. Looks like i've overlooked relative positioning a little bit :o
fabrik