document.classes.paddingTop

JavaScript 1.2+ Nav4+ Syntax

document.classes.className.tagName.paddingTop

Description

The paddingTop property specifies the distance between the left border of an element and its content. Using dot notation, the property is associated with the class called className. The definition can also specify a tag or the word all for tagName.

Example

Listing 7.88 uses paddingTop property to set the distance between a line of text and its border.

Listing 7.88 Set Top Padding with the paddingTop Property
 <html> <script> <!-- Hide //Create a style sheet class that defines the top padding document.classes.PAD.all.borderWidths(10) document.classes.PAD.all.paddingTop = "40"; //Hide End ---> </script> <p class=PAD>This ...

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.