Ir al contenido

Internet Explorer box model bug

De Wikipedia, la enciclopedia libre

Esta es una versión antigua de esta página, editada a las 02:36 23 ago 2006 por Diegojc (discusión · contribs.). La dirección URL es un enlace permanente a esta versión, que puede ser diferente de la versión actual.

(difs.) ← Revisión anterior · Ver revisión actual (difs.) · Revisión siguiente → (difs.)
Diferencias entre el ancho delWorld Wide Web Consortium y el del Internet Explorer de un elemento block-level

El Internet Explorer box model bug - fallo en el mmodelo de caja del IE es uno de los mas conocidos fallos en una implementacion CSS. Este afecta a las versiones del navegador Microsoft's Internet Explorer para Microsoft Windows hasta la versión 6. Internet Explorer 6 y 7 no están afectados en sus modos estándar, solo en "Quirks Mode." El fallo no afecta a IE para MAc en la plataforma Apple Macintosh.

Fallo (Bug)

The CSS box model describes how certain elements of web pages are displayed by graphical browsers. The box model allows block-level elements - such as paragraphs and block-quotations - to be surrounded by padding, borders, and margins. According to the specification for CSS published by the World Wide Web Consortium, when a width is explicitly specified for any block-level element it should determine only the width of the content within the box, with the padding, borders and margins added afterwards. Internet Explorer version 5 incorrectly includes the padding and borders within the specified width, resulting in a narrower box when displayed.

Trabajando en el problema

Various work-arounds have been devised to force Internet Explorer to display pages correctly. These work-arounds generally exploit other bugs in Internet Explorer's layout engine to hide rules from the browser. The best known of these work-arounds is the "box model hack" developed by Tantek Çelik. Çelik's hack — developed during his time at Microsoft working on Internet Explorer for the Macintosh, which is not affected by the bug — involves specifying a width for Internet Explorer for Windows which is then over-ridden by another width specification. This second specification is hidden from Internet Explorer for Windows by exploiting a bug in the way that browser parses CSS rules.

Internet Explorer 6 is not affected by the bug if the page contains a valid HTML document type declaration (DTD). This version goes into "quirks mode" and maintains the buggy behaviour when the DTD is absent or incomplete for reasons of backwards compatibility. It also uses quirks mode if there is an XML declaration tag before the DOCTYPE tag.

Enlaces externos