Tags

, , , ,

Following are the CSS Style Reference Vs Javascript Reference :

1. Background Properties
background -> background
background-attachment -> backgroundAttachment
background-color -> backgroundColor
background-image -> backgroundImage
background-position -> backgroundPosition
background-repeat -> backgroundRepeat

2. Border Properties
border -> border
border-bottom -> borderBottom
border-bottom-color -> borderBottomColor
border-bottom-style -> borderBottomStyle
border-bottom-width -> borderBottomWidth
border-color -> borderColor
border-left -> borderLeft
border-left-color -> borderLeftColor
border-left-style -> borderLeftStyle
border-left-width -> borderLeftWidth
border-right -> borderRight
border-right-color -> borderRightColor
border-right-style -> borderRightStyle
border-right-width -> borderRightWidth
border-style -> borderStyle
border-top -> borderTop
border-top-color -> borderTopColor
border-top-style -> borderTopStyle
border-top-width -> borderTopWidth
border-width -> borderWidth

3. Classification and Positioning Properties
clear -> clear
clip -> clip
color -> color
cursor -> cursor
display -> display
filter -> filter
position -> position
float -> styleFloat
left -> left
overflow -> overflow
top -> top
vertical-align -> verticalAlign
visibility -> visibility
z-index -> zIndex

4. Dimension Properties
height -> height
width -> width

5. Font Properties
font -> font
font-family -> fontFamily
font-size -> fontSize
font-variant -> fontVariant
font-weight -> fontWeight

6. List Properties
list-style -> listStyle
list-style-image -> listStyleImage
list-style-position -> listStylePosition
list-style-type -> listStyleType

7. Margin Properties
margin -> margin
margin-bottom -> marginBottom
margin-left -> marginLeft
margin-right -> marginRight
margin-top -> marginTop

8. Padding Properties
padding -> padding
padding-bottom -> paddingBottom
padding-left -> paddingLeft
padding-right -> paddingRight
padding-top -> paddingTop

9. Page Properties
page-break-after -> pageBreakAfter
page-break-before -> pageBreakBefore

10.Text Properties
text-align -> textAlign
text-decoration -> textDecoration
text-decoration: blink -> textDecorationBlink
text-decoration: line-through -> textDecorationLineThrough
text-decoration: none -> textDecorationNone
text-decoration: overline -> textDecorationOverline
text-decoration: underline -> textDecorationUnderline
text-indent -> textIndent
text-transform -> textTransform
letter-spacing -> letterSpacing
line-height -> lineHeight

How to use : 
– CSS –
classname
{
background-color:#fff;
}

– JavaScript –
obj = document.getElementById(“elementId”);
obj.style.backgroundColor=”#ffffff”;

Advertisements