Casadio Tozzi Pier Paolo wrote:

> Please take a look to this little source code that works best (for my 
> purposes) only with MSIE
> 
> Infact I want that the <div>#conteiner is the background of <div>#one and 
> <div>#two and it must be height like the most height <div> conteined into
> In this case <div>#two is the most height therefore I want that 
> <div>#conteiner is height like <div>#two.
> BUT that is true only with MSIE but not with FF


Hi Casadio. IE5 to IE7 does that because your container has hasLayout [1] 
(width:100%). Paste this into your code and replace your div#conteiner rule set 
with my div#conteiner rule set

div#conteiner {
/* width:100%; DELETE since this is a block element and it will be 100 percent 
wide already */
background-color:silver;
/* height:auto; DELETE since this is a block element and it will be height auto 
already */
overflow:hidden; /* ADD to contain all floats */
}

* html div#conteiner {overflow:visible;height:1%;} /* ADD so IE5~IE6 will 
contain the floats */

*+html/*/* /**/ #one h2, *+html/*/* /**/ #two h2 {margin-top:20px} /* ADD for 
IE7 to restore top margin */

* html #one h2, * html #two h2 {margin-top:20px} /* ADD for IE5~6 to restore 
top margin */


At this point the page need some substance since already the IE5~IE7 hackery is 
getting out of control. What is most importance is what you are wanting the 
final appearance of the page to look like in a good browser like Firefox, 
Safari or Opera (IE8 passes with this case). The above CSS code will render the 
page almost the same in every browser (not IE/Mac). I have got you this far 
Casadio, now please give us an idea if my CSS gives you the desired rendering.


[1] <http://www.satzansatz.de/cssd/onhavinglayout.html>


Alan

http://css-class.com/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to