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

Chapter 28. Debugging Your Code > Cross-Browser Conundrums

Cross-Browser Conundrums

HTML, CSS, JavaScript, and the Document Object Model are all referred to as interpreted code. That is, every browser that can understand these technologies follows a set of rules to help it translate and display the code you set up. Unfortunately, these rules can vary slightly or enormously from browser to browser.

A friend of mine was experimenting with CSS in his Web site, and the line-height was set to normal in every rule (see "Adjusting Leading" in Chapter 4). Although this setup looked perfectly fine in Internet Explorer 5 for Windows, in Internet Explorer 5 for the Mac, the headlines (which were multiple lines of large text) overlapped. Why? Apparently, when Microsoft programmers created Internet Explorer for Windows, they interpreted normal to mean that the browser should apply the current font size being used at that point in the page. Conversely, the Mac development team interpreted normal as meaning the default font size for the page. Thus, in Windows, the line-height would have been the same as the font size of the text being presented. But in the Mac version, the line-height would more than likely be around 12 points, causing the 36-point text lines to overlap (Figure 28.13).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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