JavaScript Reference :: Style

The Style object is not a stand-alone object. It is typically accessed through a Node object, usually as {Node Object}.style.{property}. The properties of the style object correspond to CSS properties. Where a CSS property has a hyphen, the JavaScript style properties are camel-case. For example, the CSS property background-color becomes backgroundColor.

methods

string getAttribute(string attributeName)
Returns a string that is the value of the specified attribute.
setAttribute(string attributeName, string attributeValue)
Sets the specified attribute to the specified value.

properties

background
backgroundAttachment
backgroundColor
backgroundImage
backgroundPosition
backgroundPositionX
backgroundPositionY
backgroundRepeat
border
borderBottom
borderBottomColor
borderBottomStyle
borderBottomWidth
borderCollapse
borderColor
borderLeft
borderLeftColor
borderLeftStyle
borderLeftWidth
borderRight
borderRightColor
borderRightStyle
borderRightWidth
borderSpacing
borderStyle
borderTop
borderTopColor
borderTopStyle
borderTopWidth
borderWidth
bottom
captionSide
clear
clip
bottom
left
right
top
color
content
counterIncrement
counterReset
cssFloat
cursor
direction
display
emptyCells
font
fontFamily
fontSize
fontSizeAdjust
fontStretch
fontStyle
fontVariant
fontWeight
height
left
letterSpacing
lineHeight
listStyle
listStyleImage
listStylePosition
listStyleType
margin
marginBottom
marginLeft
marginRight
marginTop
markerOffset
marks
maxHeight
maxWidth
minHeight
minWidth
orphans
outline
outlineColor
outlineStyle
outlineWidth
overflow
overflowX
overflowY
padding
paddingBottom
paddingLeft
paddingRight
paddingTop
page
pageBreakAfter
pageBreakBefore
pageBreakInside
position
quotes
right
styleFloat
tableLayout
textAlign
textDecoration
textDecorationBlink
textDecorationLineThrough
textDecorationNone
textDecorationOverline
textDecorationUnderline
textIndent
textShadow
textTransform
top
unicodeBidi
verticalAlign
visibility
whiteSpace
widows
width
wordSpacing
zIndex

events