CSS Background-Position Property

CSS Tutorial  >  Background   >   Background-position

The background-position property specifies the position of the background. The values can be

  • A combination of [top,center,bottom] and [left,center,right].
  • Two percentage values: The first value indicates the horizontal percentage, and the second value indicates the vertical percentage.
  • Two position values: The first value is the absolute horizontal position, the second value is the vertical position.

Examples below:
body { background-image: url("yp.jpg");
  background-repeat: no-repeat;
  background-position: center center;
}
body { background-image: url("yp.jpg");
  background-repeat: no-repeat;
  background-position: 20% 20%;
}

Next: CSS Background-Repeat



Copyright © 2013   1keydata.com   All Rights Reserved   Privacy Policy

CSS Tutorial
CSS Syntax
Apply CSS
CSS Media Types
CSS Cascade
CSS Inheritance
CSS Class ID
CSS Div Span
CSS Length Units

CSS Box Model
CSS Margin
CSS Border
CSS Padding
CSS Background
  CSS Background-attachment
  CSS Background-color
  CSS Background-image
  CSS Background-position
  CSS Background-repeat
CSS Color
CSS Font
CSS Link
CSS List
CSS Table
CSS Position
  CSS Absolute
  CSS Relative
  CSS Fixed
  CSS Static
  CSS Top
  CSS Bottom
  CSS Left
  CSS Right
  CSS Overflow
  CSS Z-Index
CSS Text
CSS Float
CSS Clear
CSS Cursor
CSS Wrap

CSS Codes

Resources

CSS Tutorial German