Css Backgrounds
Posted: Sun Jan 03, 2010 1:48 pm
First we can change the body background of our webpage you can also look at my thread in HTML If you dont know what that is, Now We can add this to the head section of the webpage:
<head>
<style>
%Add the style tags *Dont add this*%
</style>
</head>
Now we can set the background of the webpage to a color i choose a grayish blue color:
add this in between <style>
body {
background-color:#b0c4de
}
But we can also set an image as the background:
body {
background-image:url('bg.gif')
}
You can repeat the background horizontaly:
background-repeat:repeat-x;
And Verticly:
background-repeat:repeat-y;
Note you have to add the background repeat under the were youv set the image
<head>
<style>
%Add the style tags *Dont add this*%
</style>
</head>
Now we can set the background of the webpage to a color i choose a grayish blue color:
add this in between <style>
body {
background-color:#b0c4de
}
But we can also set an image as the background:
body {
background-image:url('bg.gif')
}
You can repeat the background horizontaly:
background-repeat:repeat-x;
And Verticly:
background-repeat:repeat-y;
Note you have to add the background repeat under the were youv set the image