Otherwise, use a different font type and size. The core screen properties supported by both IE and Navigator are width for determining screen width, height for determining screen height, and colorDepth for determining the bit depth of the color palette. You'll find colorDepth useful if you are concerned with how images look when dithered to a lower bit-depth. Although screen is useful for determining monitor settings, the object doesn't tell you the dimensions of users' browser windows. Fortunately, both Internet Explorer and Netscape Navigator provide ways of determining the actual amount of screen real estate available to the browser.
Navigator has similar properties.
Once you obtain size values for the browser window, use these values to tailor the document. Set the font size for headers, paragraphs, and other text elements. Choose alternate banners, images, and mappings. Resize tables, divisions, and layers precisely. Figure 2 shows how you can dynamically customize a Web page based on window size.