Layers

Okay, not layers, DIVs. This is an old argument going way back to the browser wars between Microsoft’s Internet Explorer and Netscape Navigator (the ancestor of both IE and today’s Firefox browser). Microsoft, having much more money and clout, clearly won that war and few people today even remember what Netscape was, but the older, more aptly descriptive terminology has stuck despite the fact that the official name for a layer today is a DIV (division of a Web page).

The DIV goes in the BODY element of your Web page. A DIV is defined as a rectangle with a specified width, height, and upper left corner position. That rectangle acts as a kind of miniature Web page within the larger Web page and can contain anything a normal Web page can.

The concept of layers actually goes back further than that, to the days when an overhead projector was the hottest high-tech item on the market. If you’re old enough (or recently attended a low-tech school), you probably have memories of your teachers placing one transparency on top of another on an overhead projector, which resulted in the information on the second transparency showing up on the screen on top of the information on the first one. The first transparency was the lower layer; the second was the higher layer; and so forth.

Web pages can be thought of in the same way — as one layer of information superimposed upon another, lower ...

Get Building a Web Site For Dummies®, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.