1. Computing

Discuss in my forum

Layers

A trick for Netscape Web Browsers

By , About.com Guide

Once you have an idea of how to direct different browsers to different parts of your site (from last week's article) you can use that to create pages that are visible only to the appropriate browser. There are two interesting tags that are not cross browser compatible: iframes and layers.

Netscape: Layers
The first thing to note is that layers will most likely not be supported in future versions of Netscape. So, if you use this tag, be aware that it will be replaced with CSS positioning in later versions of HTML.

Layers allow you to stack your HTML, and make some of it visible and some invisible. I like to use them as text callouts.

Here is some HTML for a layer that creates a red column on the right hand side of the page:
<layer top=0 left=400 width=100 height=600 bgcolor="#ff0000">
Anything I write in here will be within the layer, and not on the rest of the page.
</layer>

Then, if I want to add other text on the page, it's a good idea to put it in a table, so it doesn't overwrite or get hidden by the layer:

<table border=0 width=398>
<tr><td>
<h2>This is the main section of my page</h2>
</td></tr>
</table>

If you use layers, it's a good idea to limit the view of the page to Netscape 4.0 browsers as older browsers can get confused by them.

Another browser-specific tag: <iframe>

©2013 About.com. All rights reserved.