backgroundPositionX Property (A, ABBR, ACRONYM, ...)

Switch View :
ScriptFree
-ms-background-position-x Attribute | backgroundPositionX Property

Gets or sets the x-coordinate of the backgroundPosition property.

Syntax

CSS { -ms-background-position-x : iPositionX }
Scripting [ iPositionX = ] object.style.backgroundPositionX

Possible Values

iPositionX String that specifies or receives one of the following values.
length
Floating-point number, followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px). For more information about the supported length units, see CSS Length Units Reference.
percentage
Integer, followed by a percent sign (%). The value is a percentage of the width or height of the object.
hAlignment
Horizontal alignment value. Possible values include the following:
leftHorizontal alignment is to the left.
centerHorizontal alignment is centered.
rightHorizontal alignment is to the right.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has a default value of 0%. The Cascading Style Sheets (CSS) attribute is not inherited.

DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are supported in IE7 Standards mode and IE5 (Quirks) mode only. For more information, see About Dynamic Properties and Defining Document Compatibility.

Remarks

Windows Internet Explorer 8. The -ms-background-position-x attribute is an extension to CSS, and can be used as a synonym for background-position-x in IE8 Standards mode.

Standards Information

This property is a Microsoft extension to Cascading Style Sheets (CSS).

Applies To

A, ABBR, ACRONYM, ADDRESS, APPLET, ARTICLE, ASIDE, B, BASE, BASEFONT, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, CSSStyleDeclaration, currentStyle, CUSTOM, DD, defaults, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FIGCAPTION, FIGURE, FONT, FOOTER, FORM, FRAME, FRAMESET, HEAD, HEADER, HGROUP, hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LINK, LISTING, MARK, MARQUEE, MENU, META, NAV, nextID, NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, runtimeStyle, S, SAMP, SCRIPT, SECTION, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, XMP, CSSCurrentStyleDeclaration Constructor, CSSRuleStyleDeclaration Constructor, CSSStyleDeclaration Constructor

See Also

backgroundPositionY