document.classes.marginLeft

JavaScript 1.2+ Nav4+ Syntax

document.classes.className.tagName.marginLeft

Description

The marginLeft property specifies the distance between the left border of an element and the right 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.80 uses marginLeft property to set the distance between adjacent elements. Notice the distance between the border and the right edge of the browser window.

Listing 7.80 Set the Left Margin with the marginLeft Property
 <html> <script> <!-- Hide //Create a style sheet class that defines left 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.