gehuangyi20 / ie7-js

Automatically exported from code.google.com/p/ie7-js
0 stars 0 forks source link

hasLayout problem on IE7 with floating DIVs in a container DIV #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
--------------------------------------
1. Setup a DIV with "clear:both" and put several DIVs in it using "float:left"
2. Put a background color or a border on containing div

What is the expected output? What do you see instead?
-----------------------------------------------------
Load the page in FF: all is fine, the border of the container div goes
around the child DIVs.
Load it in IE: hasLayout is not triggered so the border stays under the
child DIVs as if it where no container div.

What version of the product are you using? On what operating system?
-

Please provide any additional information below.
-------------------------------------------------
It's not really a bug, rather an improvement to add.
I don't really know if i'm right with this, but i think it will be a good
thing to add this FIX in IE7/IE8.js because it's always a pain to remember
all these hacks.
All you have to do is to add "zoom:1" to the "container" class. I've added
this FIX in your library on my website (i added "zoom:1;" after every
"overflow: auto;", this fits in my case but i don't know if it's the good way).

I hope this can help you (althought i think youre allready aware about that).
Sorry for my bad english, I'm from Switzerland, I might have done some errors.

Regards,

Stephane Monnier

Original issue reported on code.google.com by net...@bluewin.ch on 27 Mar 2008 at 2:31

GoogleCodeExporter commented 9 years ago
You can trigger hasLayout yourself by adding:

{{{
box-sizing: content-box;
}}}

Bear in ind that hasLayout can also have adverse effects. That's why I don't 
trigger it 
automatically in IE7.js.

Original comment by dean.edw...@gmail.com on 14 Feb 2010 at 12:17