Background-Position

The background-position property controls the placement of the background.  The background- position property has the value of ‘repeat’ as the default value for the web page and can take following values

Value

Description

left top,

left center,

left bottom,

right top,

right center,

right bottom,

center top,

center center or center bottom

If only one keyword is specified, the other value will be “center”

x% y%

The first value is the horizontal position and the second value is the vertical. The top left corner is 0% 0%. The right bottom corner is 100% 100%. If only one value is given, the other value will be 50%. Default value is: 0% 0%

xpos ypos

The first value is the horizontal position and the second value is the vertical. The top left corner is 0 0. Units can be pixels (0px 0px) or any other CSS units. If only one value is given, the other value will be 50%. You can mix % and positions

It is used as
body
{ background-image: url(bg-page.png); background-repeat: no-repeat;
background-position: bottom right; }
Specifying a background position affects the tiling of a background image. When both axes are tiled, the position determines where the image tiling begins. Tiling happens in both directions: left to right and right to left, top to bottom and bottom to top.

Get industry recognized certification – Contact us

Menu