Putting Backgrounds on Your Pages
The most simple way is to use this basic html code:
To change the color of your background use the following code:
<body bgcolor="#FF0000">
To put a background image you can use this code:
<body background="image.gif">
The code above will give you a tiled background. And if you wish to place a fixed background on your page you can place this code:
<body background="image.gif" bgproperties="fixed" >
But the most convenient way to put background is by the use of your CSS
You can place this code on your CSS:
You can change the attributes on the above code to your liking.
If you want the background to repeat, change no-repeat to repeat-y
If you want to place your background anywhere but on the right bottom just change where you want the image to be; ex. left bottom
If you do not want your background to be fixed on the page...you can omit background-attachment: fixed
If you do not want any color on your background and only the image you can omit background-color:#ffffff
Labels: background codes, basic, html, tutorial