Name

hspace, vspace — NN n/a IE 4 DOM n/a

Synopsis

Read/Write

The pixel measure of horizontal and vertical margins surrounding the element. The hspace property affects the left and right edges of the element equally; the vspace affects the top and bottom edges of the element equally. These margins are not the same as margins set by style sheets, but they have the same visual effect.

Example

document.all.myBanner.hspace = 5
document.all.myBanner.vspace = 8

Value

Integer of pixel count.

Default

0

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.