Inserting a background image on your page can be done in many different ways. You can insert an image in the body tag or in one of the div tags that represent the layout of your page. More information about inserting a background image can be found on the htmldog.com website.
I wanted the picture to the left of my blog title and description so I inserted it as a background for the header. My code for the header now looks like this:
#header{
height:339px;
width:100%;
background-color:#FAFFFF;
background:#FAFFFF
url(’http://www.geocities.com/susieswe/blog2/background1.jpg’) left top no-repeat;
}
The height of the header is the same as the height of the picture I used. I set the height of the header tag after I had decided which picture to use and what size it should be.
To be able to use my own picture I needed a host to store the picture for me. I used my old Yahoo! Geocities account. The easiest way to get the URL right is to upload the picture to your host, surf to the picture and copy the URL from the address bar on your browser.

To be able to place the blog title and the description, so that they don’t overlap the image, I have to add a piece of code to the style sheet.
#blog-title {
color:#B5582C;
font-family:cursive, arial, sans-serif;
font-style:italic;
font-weight:bold;
font-size:4em;
margin: 20px 20px 30px 220px;
}
#description {
color:#695838;
font-style:italic;
font-weight:bold;
font-size: 1.5em;
margin: 5px 20px 5px 220px;
}
Information about margins and padding can be found at htmldog.com. You can find information about how to write shorter code on the page Shorthand Properties.
You can find the xhtml file here and a test blog here.
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!


