background-positionbackground-position*
*



Contents  *



Index  *Topic Contents
*Previous Topic: background-image
*Next Topic: background-repeat

background-position

Description

Specifies the initial position of the background image for the element.

Syntax

{ background-position: [percentage | length]{1,2} | [top | center | bottom] || [left | center | right]}

Remarks

The attribute has no effect if no background image has been specified for the element.

This attribute is not inherited.

Examples

Sets the background image at these x,y coordinates of the object.

{background-position: 20px 40px}

Positions the background image at the top vertical position and the center horizontal position.

{background-position: top center}

Applies To

A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, H1, H2, H3, H4, H5, H6, HTML, I, IMG, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, S, SAMP, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, INPUT type=button, INPUT type=file, INPUT type=reset, INPUT type=submit, INPUT type=text, INPUT type=image, INPUT type=checkbox, INPUT type=radio, INPUT type=password

Scripting Property

backgroundPosition, backgroundPositionX, backgroundPositionY


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.