Teil von  SELFPHP
  +++ SELFPHP CronJob-Service :: Jetzt auch als Professional-Version verfügbar! +++

:: Anbieterverzeichnis ::

Globale Branchen

Informieren Sie sich über ausgewählte Unternehmen im Anbieterverzeichnis von SELFPHP  

 

:: SELFPHP Forum ::

Fragen rund um die Themen PHP? In über 120.000 Beiträgen finden Sie sicher die passende Antwort!  

 

:: Newsletter ::

Abonnieren Sie hier den kostenlosen SELFPHP Newsletter!

Vorname: 
Name:
E-Mail:
 
 

:: Qozido ::

Die Bilderverwaltung mit Logbuch für Taucher und Schnorchler.   

 
 
Working with the DOM View


SELFPHP Produktempfehlung
Microsoft Windows Server 2008
Seite Windows Server 2008
Seite

Microsoft SQL Server 2008
Seite SQL Server 2008
Seite

Microsoft Expression Web 3
Seite Microsoft Expression
Seite


An Overview of the HasLayout Concept
The following overview is designed for those who are concerned with understanding why layout works they way it does in Internet Explorer browsers. As such, it dips into technical details that can be a bit overwhelming if you are new to the concept. You may feel free to move on to the exercise steps if you don’t fit this profile!

There are several bugs in Internet Explorer 6 that can be worked around by forcing "a layout" (an IE internal data structure) on an element. Most users are not aware of the implications of having "a layout" applied to an element. This material explains what happens when an element has a layout and what implications that has.

To begin with, in HTML there are two sets of elements.

  1. Elements that rely on a parent element to size and arrange their contents
  2. Elements that are responsible for sizing and arranging their own contents

In general, elements in Internet Explorer's HTML engine are not responsible for arranging themselves. A div or a p element may have a position within the source-order and flow of the document, but their contents are arranged by their nearest ancestor with a layout (frequently body). These elements rely on the ancestor layout to do all the heavy lifting of determining size and measurement information for them.

So What Does "having a Layout" Mean?

  • Essentially, having a layout means that an element is responsible for sizing and positioning itself and possibly any child elements.
  • Some elements have a fixed size or other special sizing constraints. They always have layout—for example, buttons, images, inputs, selects, and marquee elements have always a native size even if width and height are not specified.
  • Sometimes elements that do not normally require layout information, like a div or a span, may have properties defined that force a layout to be applied in order to support the property—for example, the element must have a layout in order to get scrollbars.
  • Once a layout is applied the "hasLayout" flag is set. This property returns true if queried.

Why is Having a Layout Important?

  • It constrains the element to a rectangular shape. That means content of the element cannot flow around other boxes anymore, for example, floating elements can't impinge on elements with layout boundaries in IE's engine.
  • Elements that do have layout may establish a new block formatting context (9.4.1 in the CSS 2.1 spec).
  • Since layouts are an additional object with cached information, as well as participating in the sizing and positioning algorithms, having a layout is not cheap—it causes increased memory usage and may cause performance degradation.
  • There are also auto-sizing side effects: an element with a layout cannot ‘shrink to fit’ its children, so for example, an absolute positioned box around an element with a layout does not shrink to fit the layout element's children.
  • A layout rectangle grows to the size of its content (height bug in IE 6).
  • A lot of people have used layout to work around IE6 bugs, particularly with relative positioned elements. However, relative positioned elements do not need a layout, and the side effects of having a layout may cause problems in this case.

Note: This material excerpted from MSDN, for more indepth material on this please visit the original article here: http://msdn.microsoft.com/en-us/library/bb250481%28VS.85%29.aspx



Seite 2 von 3 1 2 3



Downloads

Copyright © 2010
Microsoft Deutschland GmbH
Alle Rechte vorbehalten.

 Microsoft Deutschland GmbH
 




:: Premium-Partner ::

Webhosting/Serverlösungen


Premium-Partner MECO Systemhaus GmbH & Co. KG
Premium-Partner PSW GROUP GmbH & Co. KG
Premium-Partner BPI-Systeme
Premium-Partner Pixel X
Premium-Partner
 

:: SELFPHP Sponsoren ::


DM Solutions
Microsoft Deutschland GmbH
twosteps.net - ...Premium-Webhosting
Sedo - Bei uns wird PHP großgeschrieben
hostfactory.ch - OptimaNet Schweiz AG
ZEND - The PHP Company
Kaspersky Labs
HighText iBusiness
SELFPHP Sponsoren
 

Qozido


© 2001-2013 E-Mail SELFPHP OHG, info@selfphp.deImpressumKontakt