Using a picture as background. Define background-attachement as fixed. Tips and Tricks for Webmasters

Changing Pictures of Background


  • Thanks to this site, where I take the original picture (1024 x 768 pixels)
  • We use a picture as background for the body part of the page :

/* defining the picture used for background */

body
{
background-image:
url('http://YOURSITE/YOURPIC.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
}


Changing width of container


  • We define a width of 500 pixel, to adapt the content
  • We erase the background of html part (outer part of the page)



#main-content
{
background-color: transparent;
}

#container
{
width: 500px;
border: 0 none;
background-color: transparent;
margin-left: 10px;
}

html
{
background-color: transparent;
}



More Informations





One Day - One Label - One Wine



Add this gadget to Google



Discover the Most Beautiful Wineries of Switzerland
The Pictures : 
Clos, Domaines et Châteaux

Les images des Clos, Domaines et Châteaux





Blog Aide pour Blogger

Le blog des Liens du Vin




Raccourcis | Confidentialite