February 21st, 2008

DOM style properties: FF vs IE

For my own convenience and that of my loyal readers (both of you! hi!), Here is my table of style objects for Firefox and IE. When you’re manipulating styles via Javascript, it helps to know whether a style property exists in the 2 browsers worth supporting. Here is that list.

Some but not all of these properties correspond to a CSS property. Some day I’ll compile a more complete chart matching those up too.

The properties below were exposed using a script like this:
for(a in elem.style){document.write(a);}
then running it in both browsers, pasting the results into Excel and matching up the ones that exist in both.
I can tell you this list has come in handy many times while manipulating style properties with Javascript; now instead of using the printed copy tacked beside my desk, it’s here in my blog for eternity.

BTW, this list could be considered a study guide for anyone serious about Javascript + CSS development. Look down both columns - are there any you don’t know or never heard of? Do you understand what every one of those properties is, or does? What the heck is “azimuth”? Now that it’s in my blog, I won’t be able to sleep until I know…

Enjoy!

IE7 FF2

accelerator

azimuth

background

background

backgroundAttachment

backgroundAttachment

backgroundColor

backgroundColor

backgroundImage

backgroundImage

backgroundPosition

backgroundPosition

backgroundPositionX

backgroundPositionY

backgroundRepeat

backgroundRepeat

behavior

border

border

borderBottom

borderBottom

borderBottomColor

borderBottomColor

borderBottomStyle

borderBottomStyle

borderBottomWidth

borderBottomWidth

borderCollapse

borderCollapse

borderColor

borderColor

borderLeft

borderLeft

borderLeftColor

borderLeftColor

borderLeftStyle

borderLeftStyle

borderLeftWidth

borderLeftWidth

borderRight

borderRight

borderRightColor

borderRightColor

borderRightStyle

borderRightStyle

borderRightWidth

borderRightWidth

borderSpacing

borderStyle

borderStyle

borderTop

borderTop

borderTopColor

borderTopColor

borderTopStyle

borderTopStyle

borderTopWidth

borderTopWidth

borderWidth

borderWidth

bottom

bottom

captionSide

clear

clear

clip

clip

color

color

content

counterIncrement

counterReset

cssFloat

cssText

cssText

cue

cueAfter

cueBefore

cursor

cursor

direction

direction

display

display

filter

elevation

emptyCells

font

font

fontFamily

fontFamily

fontSize

fontSize

fontSizeAdjust

fontStretch

fontStyle

fontStyle

fontVariant

fontVariant

fontWeight

fontWeight

getPropertyCSSValue

getPropertyPriority

getPropertyValue

height

height

item

imeMode

layoutFlow

layoutGrid

layoutGridChar

layoutGridLine

layoutGridMode

layoutGridType

left

left

length

letterSpacing

letterSpacing

lineBreak

lineHeight

lineHeight

listStyle

listStyle

listStyleImage

listStyleImage

listStylePosition

listStylePosition

listStyleType

listStyleType

margin

margin

marginBottom

marginBottom

marginLeft

marginLeft

marginRight

marginRight

marginTop

marginTop

markerOffset

marks

maxHeight

maxHeight

maxWidth

maxWidth

minHeight

minHeight

minWidth

minWidth

MozAppearance

MozBackgroundClip

MozBackgroundInlinePolicy

MozBackgroundOrigin

MozBinding

MozBorderBottomColors

MozBorderLeftColors

MozBorderRadius

MozBorderRadiusBottomleft

MozBorderRadiusBottomright

MozBorderRadiusTopleft

MozBorderRadiusTopright

MozBorderRightColors

MozBorderTopColors

MozBoxAlign

MozBoxDirection

MozBoxFlex

MozBoxOrdinalGroup

MozBoxOrient

MozBoxPack

MozBoxSizing

MozColumnCount

MozColumnGap

MozColumnWidth

MozFloatEdge

MozForceBrokenImageIcon

MozImageRegion

MozMarginEnd

MozMarginStart

MozOpacity

MozOutline

MozOutlineColor

MozOutlineOffset

MozOutlineRadius

MozOutlineRadiusBottomleft

MozOutlineRadiusBottomright

MozOutlineRadiusTopleft

MozOutlineRadiusTopright

MozOutlineStyle

MozOutlineWidth

MozPaddingEnd

MozPaddingStart

MozUserFocus

MozUserInput

MozUserModify

MozUserSelect

msInterpolationMode

opacity

orphans

outline

outlineColor

outlineOffset

outlineStyle

outlineWidth

overflow

overflow

overflowX

overflowX

overflowY

overflowY

padding

padding

paddingBottom

paddingBottom

paddingLeft

paddingLeft

paddingRight

paddingRight

paddingTop

paddingTop

page

pageBreakAfter

pageBreakAfter

pageBreakBefore

pageBreakBefore

pageBreakInside

posBottom

parentRule

posHeight

pause

pauseAfter

pauseBefore

pitch

pitchRange

position

position

posLeft

posRight

posTop

posWidth

quotes

removeProperty

richness

right

right

rubyAlign

rubyOverhang

rubyPosition

scrollbar3dLightColor

scrollbarArrowColor

scrollbarBaseColor

scrollbarDarkShadowColor

scrollbarFaceColor

scrollbarHighlightColor

scrollbarShadowColor

scrollbarTrackColor

setProperty

size

speak

speakHeader

speakNumeral

speakPunctuation

speechRate

stress

styleFloat

tableLayout

tableLayout

textAlign

textAlign

textAlignLast

textAutospace

textDecoration

textDecoration

textDecorationBlink

textDecorationLineThrough

textDecorationNone

textDecorationOverline

textDecorationUnderline

textIndent

textIndent

textJustify

textJustifyTrim

textKashida

textKashidaSpace

textOverflow

textShadow

textTransform

textTransform

textUnderlinePosition

top

top

unicodeBidi

unicodeBidi

verticalAlign

verticalAlign

visibility

visibility

voiceFamily

volume

whiteSpace

whiteSpace

widows

width

width

wordBreak

wordSpacing

wordSpacing

wordWrap

writingMode

zIndex

zIndex

zoom

Filed under AJAX & Javascript

Leave a Reply