• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter Twelve. Working with Browsers Pa... > The Box Model Hack: Making CSS Safe ...

The Box Model Hack: Making CSS Safe for Democracy

Tantek çelik, whose name has already appeared prominently in this chapter, has provided one widely used solution to the problem posed by incorrect box model implementations. His Box Model Hack takes advantage of a CSS parsing bug in IE5.x/Windows to apply a false width that IE5.x/Windows likes and then overwrite it with the actual value [12.8]. In the example that follows, taken from http://www.tantek.com/CSS/Examples/boxmodelhack.html, the correct value for the content area is 300px, but IE/Windows misunderstands it by subtracting 100px worth of padding and borders.

12.8. Tantek Çelik's Box Model Hack solves the box model problem and is useful in fixing other browser issues as well. (http://www.tantek.com/CSS/Examples/boxmodelhack.htm)



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint