Tres Chic Geek Web Site, Print Services, and Graphic & Illustration Design Services Tres Chic Geek Web Site, Print Services, and Graphic & Illustration Design Services

 

 

Background Tutorial

Using HTML

When you see an a page with an image backgrounds, it is not one continuous .gif or .jpeg, it is actually a small .gif or .jpeg repeated. Sometimes it will take some time for a background .gif or .jpeg to load, so you should put a color command before the BODY BACKGROUND command. It will then appear that your page is a a certain color and then the background wipes over that color.

Please note: The use of two commands, one for BGCOLOR and the other for BACKGROUND, does not work on upper level browsers. You'll need to put them both together in the same command.

<BODY BGCOLOR="#FFFFFF" BACKGROUND="image.gif">

Using CSS

The CSS background properties allow you to control the background color and image on your page.

The style tags goes between your <head></head> tags.

<style type="text/css">
body
{
background-image: url('image.jpg');
background-color: #FFFFFF;
}
</style>

Additional CSS Background Properties

background-repeat: Sets if/how a background image will be repeated.
Values:repeat, repeat-x, repeat-y, no-repeat

background-attachment: Sets whether a background image is fixed or scrolls with the rest of the page.
Values: scroll, fixed

background-position:Sets the starting position of a background image.
Values: top left, top center, top right center, left center, center center, right bottom left bottom, center bottom, right , x%, y%, xpos, ypos

 

 

 

 

 

About Us | Site Map | Privacy Policy | Contact Us | ©2007 Tres Chic Geek