Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

2.2.7 [DOM Level 2 - Style] Section 2.3, Interface CSS2Properties (introduced in DOM Level 2)

E0001:

The specification states:

 Interface CSS2Properties (introduced in DOM Level 2)
 The CSS2Properties interface represents a convenience mechanism for retrieving and 
 setting properties within a CSSStyleDeclaration. The attributes of this interface 
 correspond to all the properties specified in CSS2. Getting an attribute of this 
 interface is equivalent to calling the getPropertyValue method of the 
 CSSStyleDeclaration interface. Setting an attribute of this interface is equivalent 
 to calling the setProperty method of the CSSStyleDeclaration interface.

IE7 Mode, IE8 Mode, and IE9 Mode (All Versions)

The filter property is an additional property that is supported.

IE7 Mode, IE8 Mode, IE9 Mode, IE10 Mode, and IE11 Mode (All Versions)

The following non-standard properties are supported:

  • accelerator

  • layoutFlow

  • layoutGrid

  • layoutGridChar

  • layoutGridLine

  • layoutGridMode

  • layoutGridType

  • lineBreak

  • msInterpolationMode

  • pixelBottom

  • pixelHeight

  • pixelLeft

  • pixelRight

  • pixelTop

  • pixelWidth

  • posBottom

  • posHeight

  • posLeft

  • posRight

  • posTop

  • posWidth

  • scrollbar3dLightColor

  • scrollbarArrowColor

  • scrollbarBaseColor

  • scrollbarDarkShadowColor

  • scrollbarFaceColor

  • scrollbarHighlightColor

  • scrollbarShadowColor

  • scrollbarTrackColor

  • styleFloat

  • textAutospace

  • textDecorationBlink

  • textDecorationLineThrough

  • textDecorationNone

  • textDecorationOverline

  • textDecorationUnderline

  • textJustifyTrim

IE7 Mode, IE8 Mode, IE9 Mode, IE10 Mode, IE11 Mode, and EdgeHTML Mode (All Versions)

The following non-standard properties are supported:

  • backgroundPositionX

  • backgroundPositionY

  • imeMode

  • overflow

  • overflowX

  • overflowY

  • rubyAlign

  • rubyOverhang

  • rubyPosition

  • textAlignLast

  • textJustify

  • textKashida

  • textKashidaSpace

  • textOverflow

  • textUnderlinePosition

  • wordbreak

  • writingMode

zoommode

IE7 Mode, IE8 Mode, IE9 Mode, IE10 Mode (All Versions)

The following non-standard properties are supported:

  • behavior

IE8 Mode (All Versions)

The following non-standard properties are supported:

  • msBlockProgression

  • msBoxSizing

IE9 Mode, IE10 Mode, and IE11 Mode (All Versions)

The following non-standard properties are supported:

  • accelerator

  • backgroundPositionX

  • backgroundPositionY

  • imeMode

  • layoutFlow

  • layoutGrid

  • layoutGridChar

  • layoutGridLine

  • layoutGridMode

  • layoutGridType

  • lineBreak

  • msBlockProgression

  • msBoxAlign

  • msBoxDirection

  • msBoxFlex

  • msBoxFlexGroup

  • msBoxLineProgression

  • msBoxLines

  • msBoxOrdinalGroup

  • msBoxOrient

  • msBoxPack

  • msGetPropertyEnabled

  • msInterpolationMode

  • msPutPropertyEnabled

  • msTransform

  • msTransformOrigin

  • overflowX

  • overflowY

  • pixelBottom

  • pixelHeight

  • pixelLeft

  • pixelRight

  • pixelTop

  • pixelWidth

  • posBottom

  • posHeight

  • posLeft

  • posRight

  • posTop

  • posWidth

  • rubyAlign

  • rubyOverhang

  • rubyPosition

  • scrollbar3dLightColor

  • scrollbarArrowColor

  • scrollbarBaseColor

  • scrollbarDarkShadowColor

  • scrollbarFaceColor

  • scrollbarHighlightColor

  • scrollbarShadowColor

  • scrollbarTrackColor

  • styleFloat

  • textAlignLast

  • textAutospace

  • textDecorationBlink

  • textDecorationLineThrough

  • textDecorationNone

  • textDecorationOverline

  • textDecorationUnderline

  • textJustify

  • textJustifyTrim

  • textKashida

  • textKashidaSpace

  • textOverflow

  • textUnderlinePosition

  • zoom

IE10 Mode and IE 11 Mode (All Versions)

The following non-standard properties are supported:

  • msAnimation

  • msAnimationDelay

  • msAnimationDirection

  • msAnimationDuration

  • msAnimationFillMode

  • msAnimationIterationCount

  • msAnimationName

  • msAnimationPlayState

  • msAnimationTimingFunction

  • msBackfaceVisibility

  • msContentZoomBoundary

  • msContentZoomBoundaryMax

  • msContentZoomBoundaryMin

  • msContentZoomChaining

  • msContentZooming

  • msContentZoomSnap

  • msContentZoomSnapPoints

  • msContentZoomSnapType

  • msFlowFrom

  • msFlowInto

  • msFontFeatureSettings

  • msGridColumn

  • msGridColumnAlign

  • msGridColumns

  • msGridColumnSpan

  • msGridLayer

  • msGridRow

  • msGridRowAlign

  • msGridRows

  • msGridRowSpan

  • msHighContrastAdjust

  • msHyphenateLimitChars

  • msHyphenateLimitLines

  • msHyphenateLimitZone

  • msHyphens

  • msOverflowStyle

  • msPerspective

  • msPerspectiveOrigin

  • msScrollBoundary

  • msScrollBoundaryBottom

  • msScrollBoundaryLeft

  • msScrollBoundaryRight

  • msScrollBoundaryTop

  • msScrollChaining

  • msScrollRails

  • msScrollSnapPointsX

  • msScrollSnapPointsY

  • msScrollSnapType

  • msScrollSnapX

  • msScrollSnapY

  • msTouchAction

  • msTransformStyle

  • msTransition

  • msTransitionDelay

  • msTransitionDuration

  • msTransitionProperty

  • msTransitionTimingFunction

  • msUserSelect

  • msWrapFlow

  • msWrapMargin

  • msWrapThrough

V0028:

The specification states:

 azimuth of type DOMString
 See the azimuth property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. 

All Document Modes (All Versions)

The azimuth property of the CSS2Properties interface is not supported.

V0029:

The specification states:

 background of type DOMString
 See the background property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. 

Quirks Mode (All Versions)

Setting the background property to normal is the same as setting background to none transparent scroll repeat 0% 0%.

V0030:

The specification states:

 border of type DOMString
 See the border property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. 

Quirks Mode, IE7 Mode, and IE8 Mode (All Versions)

When setting the border property by using longhand (for example, border-width:thick; border-style:dotted;), border returns blank unless there is either a style or width property present.

IE7 Mode (Internet Explorer 7)

The border, borderRight, borderLeft, borderTop, and borderBottom properties are always displayed as blank unless there is either a style or a width property present.  This is regardless of how the property was set by using shorthand or by using longhand.

V0031:

The specification states:

 borderSpacing of type DOMString
 See the border-spacing property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. 

All Document Modes (Internet Explorer 7)

The borderSpacing property is not supported.

Quirks Mode and IE7 Mode (All Versions)

Setting the borderSpacing property in the DOM has no effect on layout.  The property can be read and set from the DOM but it will not be taken into consideration when laying out the page.

V0032:

The specification states:

 captionSide of type DOMString
 See the caption-side property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. 

All Document Modes (Internet Explorer 7)

The captionSide property is not supported.

Quirks Mode and IE7 Mode (All Versions)

Setting the captionSide property in the DOM has no effect on layout.  The property can be read and set from the DOM but it will not be taken into consideration when laying out the page.

V0033:

The specification states:

 clip of type DOMString
 See the clip property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

IE7 Mode (All Versions)

The clip property is returned as an empty string instead of the correct value.

V0034:

The specification states:

 cssFloat of type DOMString
 See the float property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

Quirks Mode, IE7 Mode, and IE8 Mode (All Versions)

The cssFloat property is not supported. Similar functionality is provided by the styleFloat property.

V0035:

The specification states:

 cue of type DOMString
 See the cue property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

Quirks Mode, IE7 Mode, IE8 Mode, IE9 Mode, IE10 Mode, and IE11 Mode (All Versions)

The cue property is not supported.

V0036:

The specification states:

 cueAfter of type DOMString
 See the cue-after property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The cueAfter property is not supported.

V0037:

The specification states:

 cueBefore of type DOMString
 See the cue-before property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The cueBefore property is not supported.

V0038:

The specification states:

 elevation of type DOMString
 See the elevation property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The elevation property is not supported.

V0039:

The specification states:

 fontSizeAdjust of type DOMString
 See the font-size-adjust property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

Quirks Mode, IE7 Mode, IE8 Mode, and IE9 Mode (All Versions)

The fontSizeAdjust property is not supported.

V0040:

The specification states:

 fontStretch of type DOMString
 See the font-stretch property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

Quirks Mode, IE7 Mode, and IE8 Mode (All Versions)

The fontStretch property is not supported.

V0041:

The specification states:

 markerOffset of type DOMString
 See the marker-offset property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The markerOffset property is not supported.

V0042:

The specification states:

 marks of type DOMString
 See the marks property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The marks property is not supported.

V0043:

The specification states:

 orphans of type DOMString
 See the orphans property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (Internet Explorer 7)

The orphans property is not supported.

Quirks Mode and IE7 Mode (Internet Explorer 8 and Internet Explorer 9)

Setting the orphans property in the DOM has no effect on the page layout. The property can be read and set from the DOM but it will not be taken into consideration when laying out the page.

V0044:

The specification states:

 outline of type DOMString
 See the outline property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (Internet Explorer 7)

The outline property is not supported.

Quirks Mode and IE7 Mode (Internet Explorer 8 and Internet Explorer 9)

The outline property is accessible from the DOM. However, changing its value has no effect on the page layout.  The value of this DOM property is ignored.

V0045:

The specification states:

 outlineColor of type DOMString
 See the outline-color property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (Internet Explorer 7)

The outlineColor property is not supported.

Quirks Mode and IE7 Mode (Internet Explorer 8 and Internet Explorer 9)

Setting the outlineColor property in the DOM has no effect on the page layout.  The property can be read and set from the DOM but it will not be taken into consideration when laying out the page.

V0046:

The specification states:

 outlineStyle of type DOMString
 See the outline-style property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (Internet Explorer 7)

The outlineStyle property is not supported.

Quirks Mode and IE7 Mode (Internet Explorer 8 and Internet Explorer 9)

Setting the outlineStyle property in the DOM has no effect on layout. The property can be read and set from the DOM but it will not be taken into consideration when laying out the page.

V0047:

The specification states:

 outlineWidth of type DOMString
 See the outline-width property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (Internet Explorer 7)

The outlineWidth property is not supported.

Quirks Mode and IE7 Mode (Internet Explorer 8 and Internet Explorer 9)

Setting the outlineWidth property in the DOM does not affect the layout. The property can be read and set from the DOM but it is not used during page layout.

V0048:

The specification states:

 page of type DOMString
 See the page property definition in CSS2.
  
 Exceptions on setting 
 DOMException
  
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The page property is not supported.

V0049:

The specification states:

 pause of type DOMString
 See the pause property definition in CSS2.
  
 Exceptions on setting 
 DOMException
  
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The pause property is not supported.

V0050:

The specification states:

 pauseAfter of type DOMString
 See the pause-after property definition in CSS2.
  
 Exceptions on setting 
 DOMException
  
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The pauseAfter property is not supported.

V0051:

The specification states:

 pauseBefore of type DOMString
 See the pause-before property definition in CSS2.
  
 Exceptions on setting 
 DOMException
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The pauseBefore property is not supported.

V0052:

The specification states:

 pitch of type DOMString
 See the pitch property definition in CSS2.
  
 Exceptions on setting 
 DOMException
  
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The pitch property is not supported.

V0053:

The specification states:

 pitchRange of type DOMString
 See the pitch-range property definition in CSS2.
  
 Exceptions on setting 
 DOMException
  
 SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
  
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The pitchRange property is not supported.

V0054:

The specification states:

 "playDuring of type DOMStringSee the play-during property definition in 
 CSS2.Exceptions on setting DOMExceptionSYNTAX_ERR: Raised if the new value has a 
 syntax error and is unparsable.NO_MODIFICATION_ALLOWED_ERR: Raised if this property 
 is readonly."

All Document Modes (All Versions)

The playDuring property is not supported.

V0055:

The specification states:

 richness of type DOMString
 See the richness property definition in CSS2.
  
 Exceptions on setting 
 DOMException SYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The richness property is not supported.

V0056:

The specification states:

 size of type DOMString
 See the size property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The size property is not supported.

V0057:

The specification states:

 speak of type DOMString
 See the speak property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The speak property is not supported.

V0058:

The specification states:

 speakHeader of type DOMString
 See the speak-header property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The speakHeader property is not supported.

V0059:

The specification states:

 speakNumeral of type DOMString
 See the speak-numeral property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The speakNumeral property is not supported.

V0060:

The specification states:

 speakPunctuation of type DOMString
 See the speak-punctuation property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The speakPunctuation property is not supported.

V0061:

The specification states:

 speechRate of type DOMString
 See the speech-rate property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The speechRate property is not supported.

V0062:

The specification states:

 stress of type DOMString
 See the stress property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The stress property is not supported.

V0063:

The specification states:

 textShadow of type DOMString
 See the text-shadow property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

Quirks Mode, IE7 Mode, IE8 Mode, and IE9 Mode (All Versions)

The textShadow property is not supported.

V0064:

The specification states:

 voiceFamily of type DOMString
 See the voice-family property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The voiceFamily property is not supported.

V0065:

The specification states:

 volume of type DOMString
 See the volume property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

All Document Modes (All Versions)

The volume property is not supported.

V0066:

The specification states:

 whiteSpace of type DOMString
 See the white-space property definition in CSS2.
  
 Exceptions on setting 
 DOMExceptionSYNTAX_ERR: Raised if the new value has a syntax error and is unparsable.
 NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

Quirks Mode, IE7 Mode, and IE8 Mode (All Versions)

Setting the whiteSpace property in the DOM has no effect on layout.  The property can be read and set from the DOM but it will not be taken into consideration when laying out the page.

Show:
© 2016 Microsoft