document.classes.marginRight

JavaScript 1.2+ Nav4+ Syntax

document.classes.className.tagName.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 class called className. The definition can also specify a tag or the word all for tagName.

Example

Listing 7.81 uses 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.81 Set the Right Margin with the marginRight Property
 <html> <script> <!-- Hide //Create a style sheet class that defines right margin document.classes.FORMAT1.all.borderWidths(10); ...

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.