About the line elements can be set to the height of those things

Source: Internet
Author: User

Css:haslayout knows how much we all know the browser has bugs, and IE bugs seem to be more than most browsers. One of the reasons why IE behaves differently from other browsers is that the display engine uses an internal concept called layout. Because layouts are a concept that is specific to how the display engine works internally, it is not generally necessary to know about it. However, the layout problem is that many IE shows the source of the bug, so understanding the concept and how it affects CSS can be helpful in fixing bugs.

first, what is Haslayout

Haslayout is an internal component of the Windows Internet Explorer rendering engine. In the InternetExplorer,use layout concepts to control the dimensions and positioning of elements. Ideally, all elements control their size and positioning. However, this can cause a lot of performance problems in IE. Therefore, the IE development team decided to apply the layout only to those elements that needed it in the real place, so that the performance overhead could be reduced sufficiently.  the element that owns the layout (Havelayout) is responsible for the size and positioning of itself and its child elements. If an element has no layout, its size and position are controlled by the most recent ancestor element that owns the layout. the IE display engine uses layout concepts to reduce its processing overhead. An element either calculates the size and organization of its own content, or relies on the parent element to calculate the size and organization of the content. To adjust these two different concepts, the rendering engine takes the Haslayout property, which can be either true or false. When the value of an element's Haslayout property is true, we say that the element has a layout, and when an element has a layout, it is responsible for sizing and positioning itself and possible descendant elements. In short, this means that the element needs to spend more to maintain itself and its content, rather than relying on ancestral elements to do the work. Therefore, some elements will have a layout by default. When we say that an element "has layout" or "Get Layout", or an element "haslayout", we mean that its Microsoft proprietary attribute Haslayout is set to true. A "layout element" can be an element that has layout by default or an element that gets layout by setting some CSS properties. If an HTML element has the Haslayout attribute, then the value of the element's haslayout must be only true,haslayout as a read-only property, and once triggered, it is irreversible. Through IE Developertoolbar can see whether the HTML element under IE has haslayout, under IE developertoolbar, have the element of haslayout, usually show as "haslayout = 1". second, the default has the Haslayout property   third, trigger Haslayout attribute  In many cases, we can change the state of the haslayout to true to solve a lot of the bugs shown in IE. The  haslayout property cannot be set directly, and you can only trigger and change the haslayout state by setting some specific CSS properties. The following lists some of the CSS property values that can trigger haslayout.  display  start Haslayout value:inline-block  Cancel Haslayout value: Other values  ------------------------------------ -- width/height  Startup Haslayout Value: Haslayout value except auto is canceled:auto  (common for IE6 and earlier versions, this method is known as Holly Crack (Hollyhack ), which sets the height of this element to 1% (height:1%;). Note, however, that this method is invalidated when the overflow property of this element is set to visible. )--------------------------------------- position  start Haslayout value:absolute  Cancel the value of Haslayout: Static  ---------------------------------------- float  start Haslayout value: Left or right  Cancel the value of Haslayout:none --------------------------------------- zoom  start Haslayout value: Value   Cancels the value of haslayout: Narmal or null   (another IE private attribute, incompatible standard.  IE7 also has some additional properties that can trigger this property (not a full list):  min-height: (Any value)  max-height: (any value except none)  min-width: (Any value)  max-width: (any value except none)  overflow: (any value except visible)  overflow-x: (any value except visible)  overfloW-y: (any value except visible) position:fixed   iv. Discovery and useThe problems caused by the element haslayout are generally easy to find: Often the content is misaligned or even completely invisible, such as floating or absolute positioning sub-elements of the height of the container will collapse, in Ie6/ie7 we add zoom:1 properties to trigger the Haslayout, In order to repair the problem of high collapse, for example, we often encounter IE6 and IE7 at the same time the bug, this time can consider whether it originates from haslayout, you can add some can trigger the haslayout properties to solve.

About the line elements can be set to the height of those things

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.