Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
compare webbrowser
Freenet DSL
Who's Online
7 user(s) are online (7 user(s) are browsing encyclopedia)

Members: 0
Guests: 7

more...
browser tip
Unix Befehle
manual of unix befehle
recommendation!
Sponsored
partner

Internet Explorer box model bug

The Internet Explorer box model bug is one of the best-known bugs in a popular implementation of Cascading Style Sheets (CSS). It affects CSS-aware versions of Microsoft s Internet Explorer web browser for Microsoft Windows up to version six. Internet Explorer 6 is not affected in its standards-compliant mode, only in its quirks mode. The bug does not affect Internet Explorer for Mac on the Apple Macintosh platform.

=Bug=

The CSS box model describes how certain elements of , 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 incorrectly includes the padding and borders within the specified width, resulting in a narrower box when displayed.

=Work-arounds=

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 maintains the buggy behaviour when the DTD is absent or incomplete for reasons of backwards compatibility.

=External links=

  • [http://tantek.com/CSS/Examples/boxmodelhack.html Tantek Ã?elik s description of the box model hack ]
  • [http://webdesign.about.com/od/css/a/aaboxmodelhack.htm Getting Internet Explorer to Play Well with CSS] - article on about.com that outlines various ways to get around box model problem and other IE bugs.
  • [http://www.info.com.ph/~etan/w3pantheon/style/modifiedsbmh.html Modified Simplified Box Model Hack]
  • [http://virtuelvis.com/archives/2004/02/css-ie-only Hack-free CSS for IE] - article on using conditional statements instead of hack to deal with IE.