css background image center code example

Example 1: move css background image

background-image: url('w3css.gif');
 background-repeat: no-repeat;
 background-attachment: fixed;
 background-position: center;

Example 2: css align background image center

body{ 
   background-image: url('css.gif');
   background-repeat: no-repeat;
   background-position: center; 
 }

Example 3: css align backround image to the right

.right-align-background {
    background-position: center right;
}

Example 4: background position in html

background-position: right top;

Tags:

Misc Example