![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
On the mac, apparently the floated inner panels are the full width of the parent (RightPanel), wheras in NS and IE they are the width of their own content. |
|
I have set them as display:inline, |
#3
| |||
| |||
|
|
and then Aaron Robson said: On the mac, apparently the floated inner panels are the full width of the parent (RightPanel), wheras in NS and IE they are the width of their own content. CSS2 #9.5 Floats: "A floated box must have an explicit width (assigned via the 'width' property, or its intrinsic width in the case of replaced elements)." Your div is not replaced. You must specify the width or it could be anything. IIRC most browsers will set it to the width of the container. I have set them as display:inline, CSS2 #9.5.1 Positioning the float: the 'float' property: "The 'display' [property on floated elements] is ignored, unless it has the value 'none'." |

#4
| |||
| |||
|
|
CSS2 #9.5 Floats: "A floated box must have an explicit width (assigned via the 'width' property, or its intrinsic width in the case of replaced elements)." Your div is not replaced. You must specify the width or it could be anything. IIRC most browsers will set it to the width of the container. I have set them as display:inline, CSS2 #9.5.1 Positioning the float: the 'float' property: "The 'display' [property on floated elements] is ignored, unless it has the value 'none'." Thanks for your response Viza. I think I'd read that, but hoped it didn't really mean it! hence my futile attempt with the display:inline ![]() Hmmm. Is there any solution to this if I want to have the DIVs size to the content ? As I see it I could set a percentage width, but as I don't know what will go into them on any particular page, this could lead to some unfortunate wrapping or even overflow. Since it is working in IE5.5, IE6 and NN7.1, it seems as if one option would be to use the \*/ hack to make the Mac read css with % widths in for those elements. I wonder how many users are likely to hit my site with a browser which does it 'correctly' ? Not many I imagine. Thoughts / solutions anyone ? Cheers Aaron |
#5
| |||
| |||
|
|
Since it is working in IE5.5, IE6 and NN7.1, it seems as if one option would be to use the \*/ hack to make the Mac read css with % widths in for those elements. I wonder how many users are likely to hit my site with a browser which does it 'correctly' ? One thing you need to remeber is that if you make a site that relies on a bug, or in this case relies on a browser happening to do what you want at random, then you have no guarantee that future versions will behave in the same way. |
|
You need to make your site so that it works on a theoretical 'perfect css compliant' browser, because this is what browsers are moving towards* and then work backwards towards the hacks you need to make it work. |

![]() |
| Thread Tools | |
| Display Modes | |
| |