PDA

View Full Version : Differences between divs and layers.


Andromeda
03-25-2007, 03:22 AM
I'm looking at the differences between a div tag and a layer.

The only difference I can see is that with a layer the code get's its properties from the html code like this:

#menu01 {
position:absolute;
width:126px;
height:157px;
z-index:1;
top: 207px;
left: 232px;
visibility: visible;
}

whereas a div gets its properties from the css.

Are there any other differences and when would it be preferable to use a layer instead of a div?

davidj
03-25-2007, 10:26 AM
they are the same

Layer is a term used for a div

chriskq
03-25-2007, 12:48 PM
i try not to think as divs as layers so much. you can make the page seem it has layers by having a background image on a parent div with smaller divs (blocks of content) on top of the parent.

you can always get around using absolute positioning when designing a foundation or page structure.

do u kno that anything inside a div that is positioned absolute has to be postioned relative.

domedia
03-25-2007, 03:59 PM
layer is a dw term for a div you move around in design view

Andromeda
03-26-2007, 06:09 AM
Thanks for that guys.


do u kno that anything inside a div that is positioned absolute has to be postioned relative.

Relative to the parent div I presume??