Previous page Next page

Fixed-Width Objects

One of the primary functions of a web browser is to present text, wrapped at the right (or left when dealing with internationalization) border of the browser window. The browser always attempts to avoid adding a horizontal scrollbar. However, if fixed-width objects, such as tables and pre-formatted (<pre> tags) text are used, the browser makes wrapping a secondary priority to presenting the data exactly as the HTML dictated.

Web browsers do not resize themselves larger when scrollbars are added. Thus, if there are more lines of text than can fit in the height of the browser window, a vertical scrollbar is added. This now takes up some of the width of the browser, and less text displays on a single line. If text is wider than the width of the browser, a horizontal scrollbar is added. This now takes up some of the height of the browser, and fewer lines of text are displayed.

Given the small size of the browser, it is highly desirable to avoid causing scrollbars to appear. Unless the amount of text shown in a page is kept to a bare minimum, it is unlikely that a vertical scrollbar will be avoided. However, avoiding fixed-width objects, or ensuring that the size of fixed-width is kept small, will gain some viewable space on the browser.

In general, if scrolling is a requirement, vertical scrolling is better perceived by users than horizontal scrolling.


Previous page Next page