The most common tag that is used in the creation of a layer is the DIV tag, coming a close second is the SPAN tag.
<DIV> </DIV> or <SPAN> </SPAN>
Using a DIV tag to contain CSS attributes gives you the means to create a layer that can be placed anywhere in, or in some cases out of, your page. The layer and its contents can be affected by the numerous CSS attributes.
Here is a basic layer that is given a height and width of 100 pixels with a border and background colour.
<div style=" width:100px; height:100px; border:2px solid #8e8462; background-color:#c9bda9"></div>
And now with some contents.
<div style=" width:100px; height:100px; border:2px solid #8e8462; background-color:#c9bda9">Hey ..I've got contents <br>yoo hoo!</div>
The contents of the layer can be just about anything you want, even HTML tags
Once you include the position attribute along with left and top you're really in business because now you can position your layer pixel perfect within your page.
<div style=" position:absolute; left:100px; top:780px; width:100px; height:100px; border:2px solid #8e8462; background-color:#c9bda9"></div>
untingground.net |
![]() |
|