What is haslayout?
I've read some article on it but didn't get what is actually. can anyone on SO explain me.
Is it only related to IE6 only?
What does zoom:1
?
Is layout
is a IE only TAG?
Edit:
I found this info very informative for me
Because Internet Explorer is so old (as it was one of the first browsers available), it hasn't had the luxury of starting anew as current browser do. So as time went by, Microsoft began adapting new engines to make use of CSS. Seems fine… However, CSS changes the fundamental assumption that Internet Explorer's engine is based on – that anything significant is a rectangle that contains all its content.
So to deal with the new standards of CSS, Microsoft decided to fix their ancient engine by implementing the hasLayout property, instead of rebuilding IE. Every element in Internet Explorer now has a hasLayout property. Depending on the element, it is set to either true or false by default. If hasLayout is set to true – the element is an independent box that is responsible for rendering itself. If false – then the element relies on a parent element that has hasLayout set to true to render it. This is where a majority of IE bugs come to life.
source: http://bytesizecss.com/blog/post/fix-haslayout-with-one-line-of-css
I found one more discussion here also : http://www.molly.com/2007/03/30/back-to-work-someone-please-clearly-articulate-haslayout/
It's a non-standard property on an HTML element which is only supported by IE7 and lower ( IE8 compatability mode too ), which if triggered, causes the element to be rendered in a certain way ( which can be unexpected, random, can be a godsend or can be hell ).
Classic example is giving layout to an element so it can clear floats.
#wrapper { zoom:1; }
The element will now contain floats. Any of these properties and value other than auto/normal will trigger the layout property.
* display: inline-block
* height: (any value except auto)
* float: (left or right)
* position: absolute
* width: (any value except auto)
* writing-mode: tb-rl
* zoom: (any value except normal)
Please have a thorough read @ http://reference.sitepoint.com/css/haslayout
链接地址: http://www.djcxy.com/p/88402.html上一篇: 试图清除浮动的div在IE6中有固定的高度时出现问题
下一篇: 什么是布局?