Backgrounds
How do I change the background?
Don't forget the start tags and end tags. All the codes on this page go in between these two tags!
<style type="text/css"> |
</style> |
Background Color
To change the background color, use this code.
body{background:pink}
Background Image
To change the background color, use this code.
body{background:url(http://url of your image.gif)}
Fixed Background Image
To change the background color, use this code.
body{background:url(http://images.neopets.com/backgrounds/tile4.gif) fixed}
Positioned Background Image
To position a background image, so that it sits in one particular place on the page, use this code. You can change "fixed no-repeat" to repeat if you want the image to scroll. Change "bottom right" to the correct location you want the image in.
body {background:url(URL OF YOUR IMAGE) fixed no-repeat bottom right}
In the above code, you'll notice the 'no-repeat'. There are times when you'll need to change this. If you want your image to tile across the page, for instance. Below are the specific terms you may need.
repeat | - tiles image horizontally and vertically |
no-repeat | - doesn't repeat the image at all |
repeat-y | - tiles the image vertically only |
repeat-x | - tiles the image horizontally only |
Combining Background Properties
You can combine all of the background properties by using this code.
body {
background:pink;
background:url(URL OF YOUR IMAGE) fixed no-repeat bottom right;
}