The Javascript Style object represents an individual style statement. The Javascript Style object can be accessed from the document or from the elements to which that style is applied.
Property |
Description |
Values |
IE |
F |
N |
background |
Sets or returns all background properties in one |
backgroundColor
backgroundImage
backgroundRepeat
backgroundAttachment
backgroundPosition |
4 |
1 |
6 |
backgroundAttachment |
Sets or returns whether a background image is fixed or scrolls with the rest of the page |
scroll
fixed |
4 |
1 |
6 |
backgroundColor |
Sets or returns the background color of the element |
color-rgb
color-hex
color-name
transparent |
4 |
1 |
6 |
backgroundImage |
Sets or returns the background image of the element |
url("URL")
none |
4 |
1 |
6 |
backgroundPosition |
Sets or returns the starting position of the background image |
top left
top center
top right
center left
center center
center right
bottom left
bottom center
bottom right
x-% y-%
x-pos y-pos |
4 |
1 |
6 |
backgroundPositionX |
Sets or returns the x-coordinates of the backgroundPosition property |
left
center
right
x-%
x-pos |
4 |
|
|
backgroundPositionY |
Sets or returns the y-coordinates of the backgroundPosition property |
top
center
bottom
y-%
y-pos |
4 |
|
|
backgroundRepeat |
Sets or returns if/how a background image will be repeated |
repeat
repeat-x
repeat-y
no-repeat |
4 |
1 |
6 |
Property |
Description |
Values |
IE |
F |
N |
border |
Sets or returns all properties for the four borders in one |
borderWidth
borderStyle
borderColor |
4 |
1 |
6 |
borderBottom |
Sets or returns all properties for the bottom border in one |
borderWidth
borderStyle
borderColor |
4 |
1 |
6 |
borderLeft |
Sets or returns all property for the left border in one |
borderWidth
borderStyle
borderColor |
4 |
1 |
6 |
borderRight |
Sets or returns all property for the right border in one |
borderWidth
borderStyle
borderColor |
4 |
1 |
6 |
borderTop |
Sets or returns all property for the top border in one |
borderWidth
borderStyle
borderColor |
4 |
1 |
6 |
borderBottomColor |
Sets or returns the color of the bottom border |
borderColor |
4 |
1 |
6 |
borderLeftColor |
Sets or returns the color of the left border |
borderColor |
4 |
1 |
6 |
borderRightColor |
Sets or returns the color of the right border |
borderColor |
4 |
1 |
6 |
borderTopColor |
Sets or returns the color of the top border |
borderColor |
4 |
1 |
6 |
borderBottomStyle |
Sets or returns the style of the bottom border |
borderStyle |
4 |
1 |
6 |
borderLeftStyle |
Sets or returns the style of the left border |
borderStyle |
4 |
1 |
6 |
borderRightStyle |
Sets or returns the style of the right border |
borderStyle |
4 |
1 |
6 |
borderTopStyle |
Sets or returns the style of the top border |
borderStyle |
4 |
1 |
6 |
borderBottomWidth |
Sets or returns the width of the bottom border |
borderWidth |
4 |
1 |
6 |
borderLeftWidth |
Sets or returns the width of the left border |
borderWidth |
4 |
1 |
6 |
borderRightWidth |
Sets or returns the width of the right border |
borderWidth |
4 |
1 |
6 |
borderTopWidth |
Sets or returns the width of the top border |
borderWidth |
4 |
1 |
6 |
borderColor |
Sets or returns the color of all four borders (can have up to four colors) |
color-rgb
color-hex
color-name |
4 |
1 |
6 |
borderStyle |
Sets or returns the style of all four borders |
none
dotted
dashed
solid
double
groove
ridge
inset
outset |
4 |
1 |
6 |
borderWidth |
Sets or returns the width of all four borders |
thin
medium
thick
length |
4 |
1 |
6 |
margin |
Sets or returns the top, right, bottom, and left margins of the element |
marginTop
marginRight
marginBottom
marginLeft |
4 |
1 |
6 |
marginBottom |
Sets or returns the bottom margin of the element |
auto
length
% |
4 |
1 |
6 |
marginLeft |
Sets or returns the left margin of the element |
auto
length
% |
4 |
1 |
6 |
marginRight |
Sets or returns the right margin of the element |
auto
length
% |
4 |
1 |
6 |
marginTop |
Sets or returns the top margin of the element |
auto
length
% |
4 |
1 |
6 |
outline |
Sets or returns the color, style, and width of the outline around the element |
outlineColor
outlineStyle
outlineWidth |
5M |
1 |
6 |
outlineColor |
Sets or returns the color of the outline around the element |
color-rgb
color-hex
color-name
invert |
5M |
1 |
6 |
outlineStyle |
Sets or returns the style of the outline around the element |
none
dotted
dashed
solid
double
groove
ridge
inset
outset |
5M |
1 |
6 |
outlineWidth |
Sets or returns the width of the outline around the element |
thin
medium
thick
length |
5M |
1 |
6 |
padding |
Sets or returns the top, right, bottom, and left padding of the element |
paddingTop
paddingRight
paddingBottom
paddingLeft |
4 |
1 |
6 |
paddingBottom |
Sets or returns the bottom padding of the element |
length
% |
4 |
1 |
6 |
paddingLeft |
Sets or returns the left padding of the element |
length
% |
4 |
1 |
6 |
paddingRight |
Sets or returns the right padding of the element |
length
% |
4 |
1 |
6 |
paddingTop |
Sets or returns the top padding of the element |
length
% |
4 |
1 |
6 |
Property |
Description |
Values |
IE |
F |
N |
clear |
Sets or returns which sides of an element other floating elements are not allowed |
left
right
both
none |
4 |
1 |
6 |
clip |
Sets or returns the shape of an element. What if an image is larger than the element it goes inside? - This property lets you specify the dimensions of an element that should be visible, and the element is clipped into this shape, and displayed |
auto
rect( top right bottom left ) |
4 |
1 |
6 |
clipBottom |
Returns the bottom coordinate of the clipping region |
auto
length |
5W |
1 |
6 |
clipLeft |
Returns the left coordinate of the clipping region |
auto
length |
5W |
1 |
6 |
clipRight |
Returns the right coordinate of the clipping region |
auto
length |
5W |
1 |
6 |
clipTop |
Returns the top coordinate of the clipping region |
auto
length |
5W |
1 |
6 |
content |
Sets or returns meta-information |
|
5M |
1 |
6 |
counterIncrement |
|
|
5M |
1 |
6 |
counterReset |
|
|
5M |
1 |
6 |
cssFloat |
|
|
5M |
1 |
6 |
cursor |
Sets or returns the type of cursor to be displayed when the mouse pointer moves over the element |
auto
crosshair
default
hand
pointer
move
e-resize
ne-resize
nw-resize
n-resize
se-resize
sw-resize
s-resize
w-resize
text
wait
help
all-scroll (IE6+)
col-resize (IE6+)
no-drop (IE6+)
not-allowed (IE6+)
pointer (IE6+)
progress (IE6+)
row-resize (IE6+)
url( uri ) (IE6+)
vertical-text (IE6+) |
4 |
1 |
6 |
direction |
Sets or returns the reading order |
ltr
rtl |
5 |
1 |
6 |
display |
Sets or returns how/if an element is displayed |
block
none
inline
inline-block
list-item (IE6+)
table-header-group
table-footer-group |
4 |
1 |
6 |
filter |
Sets or returns the filter/filters applied to the element |
|
4W |
|
|
layoutGrid |
|
|
5W |
|
|
layoutGridChar |
|
|
5W |
|
|
layoutGridLine |
|
|
5W |
|
|
layoutGridMode |
|
|
5W |
|
|
layoutGridType |
|
|
5W |
|
|
markerOffset |
|
|
5M |
1 |
6 |
marks |
|
|
5M |
1 |
6 |
maxHeight |
|
|
5M |
1 |
6 |
maxWidth |
|
|
5M |
1 |
6 |
minHeight |
|
|
6 |
1 |
6 |
minWidth |
|
|
5M |
1 |
6 |
MozOpacity |
|
|
|
1 |
6 |
overflow |
|
|
4 |
1 |
6 |
overflowX |
|
|
5W |
1 |
6 |
overflowY |
|
|
5W |
1 |
6 |
styleFloat |
|
|
4 |
|
|
verticalAlign |
|
|
4 |
1 |
6 |
visibility |
|
|
4 |
1 |
6 |
width |
|
|
4 |
1 |
6 |
zoom |
|
|
5W |
|
|