Name
HEIGHT, WIDTH — NN 4 IE n/a HTML n/a
Synopsis
HEIGHT=”length"Optional
WIDTH=”length"
Define the minimum size of the LAYER element. When
you add content to the layer during initial loading, however, the
attribute settings do not restrict the amount of the content that is
visible along either axis. For example, if you display an image in a
LAYER that is 120 pixels wide by 90 pixels high,
the actual visible size of a LAYER element whose
HEIGHT and WIDTH attributes are
set to a smaller size expands to allow the full image to appear. The
same happens to text or other content: the viewable region expands to
allow all content to appear. To restrict the visible portion of the
content, set the CLIP attribute.
Setting the HEIGHT and WIDTH
attributes to specific sizes is helpful when you are creating a
colored or patterned rectangle (via the BGCOLOR or
BACKGROUND attributes) to act as an underlying
layer beneath some other positioned content. Without content pushing
on the edges of the LAYER, the
HEIGHT and WIDTH attributes set
the clipping region to their sizes.
Example
<LAYER BGCOLOR="yellow" SRC="instrux.html" WIDTH=200 HEIGHT=300></LAYER>
Value
Positive integer values (optionally quoted) or percentage values
(quoted). You can reduce both values to zero to not only hide the
element (which you can also do with the VISIBILITY
attribute), but also prevent the element from occupying any page
space.
Default
Naturally flowing viewing area of LAYER content.
Object Model Reference
- NN
[window.]document. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access