Layers:
•Layers help
you position your content on the page by coordinate positions. So you can put
stuff exactly where you want them and you can stack layers on top of eachother.
note: Tables and Frames are also used to layout
information on the page but cannot be stacked.
Warning!!! Layers are hard to keep in consistent across browsers. They tend to move around and move content around.
•<layer>
content </layer>
•the layer tag
has attibutes:
id=name (name of the layer you create to identify it)
top=y (position from top of browser)
left=x (postition from bottom of browser)
width=x (width
of layer)
height=y (height of layer)
src="file.html" (optional, html file in layer)
clip="t,l,r,b" (optional, distance around content of layer
from layer edges)
z-index=z (stacking order, what's on top, the higher the number the higher
the layer)
bgcolor="color" (optional, background color of layer)
background="image.gif" (optional, background image for layer)
TO
BE DISCUSSED LATER IN THE SEMESTER:
•There are actually many ways to make a layer: <layer> tag,
<ilayer> tag, <div> tag, and
<span> tag.
•The <div> and <span> tags will work in IE and Netscape,
while the others will only work in Netscape.
example>>>
of these different techniques
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Layers</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<layer id="one" top="101" left="209" width="100" height="100" background="grass.gif"
z-index="2"><font color="white">HI</font></layer>
</body>
</html>