document.ids.marginRight

JavaScript 1.2+ Nav4+ Syntax

document.ids.idName.marginRight

Description

The marginRight property specifies the distance between the right border of an element and the left border of another element. Dot notation is used to associate this property with the ID called idName.

Example

Listing 7.125 uses the marginRight property to set the distance between adjacent elements. Notice the distance between the border and the right edge of the browser window.

Listing 7.125 Set the Right Margin with the marginRight Property
 <html> <script> <!-- Hide //Create a style sheet id that defines the right margin document.classes.FORMAT.all.borderWidths(10); document.ids.margin1.marginRight = 40; document.ids.margin2.marginRight ...

Get Pure JavaScript 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.