Log in

View Full Version : inside "div" larger than outsite "div"



Mahmoud Adel
02-21-2009, 08:02 AM
hi all ,,

i noticed a behavior difference between firefox and net explorer , thats when a larger div exists in a smaller one , for example



<div style="border:1px solid #cccccc;width:50px; height:80px">
<div style="border:1px solid #cccccc;width:90px; height:50px"></div>
</div>


in net explorer the outside will stretch to the inside width , in firefox the inside will break the boundry of the outside , my question how to make firefox behave like net explorer in this example

thanks

Snookerman
02-21-2009, 09:07 AM
I'm guessing you are talking about IE6. That is actually a well known bug that IE6 has that causes many problems. If you want to mimic that, you could just give the outer container the same width as the inner one.

Good luck!

Mahmoud Adel
02-22-2009, 06:01 AM
thanks , yes really i tested on net explorer 6 , but the feature of net explorer behaviour is that makes div much like 'td' which is extended in all browsers and i'm coming from table based layouts so i expected div to be much like td , yes really it can be easy to set the inner smaller or the same of the outer but what about contents that can not be wrapped (large images or texts that can't be wrapped) for example with three column design if the content of the center column gets larger than expected (by image for example) the design will look terrible , on the other hand with 'td' it will be at leat acceptable