Name

Style — cascading style sheet attributes

Availability

Client-side JavaScript 1.2

Synopsis

// Navigator
document.classes.className.tagName
                     document.ids.elementName
                     document.tags.tagName
                     document.contextual(...)
// Internet Explorer
htmlElement.style

Properties

The Style object has properties corresponding to each of the CSS attributes supported by the browser.

Methods

borderWidths(top, right, bottom, left)

Set all border width properties. Navigator 4.

margins(top, right, bottom, left)

Set all margin properties. Navigator 4.

paddings(top, right, bottom, left)

Set all padding properties. Navigator 4.

Get Webmaster in a Nutshell, Second Edition 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.