• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

The layer Object [4]

The layer Object [4]

The layer object is used to embed layers of content within a page; they can be hidden or not hidden. Either type is accessible through JavaScript code. The most common use for layers is in developing Dynamic HTML (DHTML). With layers, you can create animation or other dynamic content on a page by cycling through the layers you have defined.

Properties

  • above— Places a layer on top of a newly created layer.

  • background— Used to specify a tiled background image of the layer.

  • below— Places a layer below a newly created layer.

  • bgColor— Sets the background color of the layer.

  • clip(left, top, right, bottom)— Specifies the visible boundaries of the layer.

  • height— Specifies the height of the layer, expressed in pixels (integer) or by a percentage of the instant layer.

  • ID— Previously called NAME. Used to name the layer so that it can be referred to by name and accessed by other JavaScript code.

  • left— Specifies the horizontal positioning of the top-left corner of the layer; used with the Top property.

  • page[n]— Where [n] is x or y. Specifies the horizontal (x) or vertical (y) positioning of the top-left corner of the layer, in relation to the overall enclosing document. (Note: This is different from the Left and Top properties.)

  • parentLayer— Specifies the layer object that contains the present layer.

  • SRC— Specifies HTML source to be displayed with the target layer. (This source can also include JavaScript.)

  • siblingAbove— Specifies the layer object immediately above the present one.

  • siblingBelow— Specifies the layer object immediately below the present one.

  • top— Specifies the vertical positioning of the top-left corner of the layer. (Used with the Left property.)

  • visibility— Specifies the visibility of the layer. Three choices are possible: show (visible), hidden (not visible), and inherit (layer inherits the properties of its parent).

  • width— Specifies the width of the layer. Used for wrapping procedures; that is, the width denotes the boundary after which the contents wrap inside the layer.

  • z-index— Specifies the Z-order (or stacking order) of the layer. Used to set the layer's position within the overall rotational order of all layers. Expressed as an integer. (Used where there are many layers.)


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint