document.classes.borderTopWidth

JavaScript 1.2+ Nav4+ Syntax

document.classes.className.tagName.borderTopWidth

Description

The borderTopWidth property specifies the width of the top border of an element as associated with the class called className. The definition can also specify a tag or the word all for tagName.

Example

Listing 7.68 uses the borderTopWidth property to set the size of the top border that surrounds a text header. Notice that only the top portion of the border is shown.

Listing 7.68 Setting the Top Border Width with the borderTopWidth Property
 <html> <script> <!-- Hide //Create a style sheet class that creates a top border document.classes.BTW.all.borderTopWidth = "10"; //Hide End ---> </script> <h2 class=BTW>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.