FANDOM


The CSS -ms-background-position-x Microsoft extension property sets the X-coordinate of the background-position property. This property can be used in IE8 as a synonym for the background-position-x property

Values

Value Description
<percentage> Percentage is in reference to the dimensions of the box of the current element. Value specifies the percentage on both the image and the canvas and may be negative (20% indicates the reference point 20% from the left side of the image is to be located at 20% from the left side of the element's rendering box).
<length> Represents an absolute X-coordinate position for the image and may be negative. Examples are cm, pt, px, etc.
left Image is positioned to the left of the screen on the X-axis.
center Image is centered in the screen on the X-axis.
right Image is positioned to the right of the screen on the X-axis.


HTML example:

<body style="background-image:url('http://www.foo.com/image.png');
background-repeat:repeat-y; -ms-background-position-x:center;">
TEXT
</body>


CSS example:

body {
      background-image:url("http://www.foo.com/image.png");
      background-repeat:repeat-y;
      -ms-background-position-x:center;
}

See Also

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.