...

View Full Version : Problems With Background Images, Again



ConnorB
01-30-2007, 12:43 AM
I'm sure you've all heard the story before so here's my information. I've tried changing the file type, I've tried doing some other stuff too that was ridiculous... Nothing worked.

CSS:


body {
background-image: url('design/images/background.jpg');
}

#container {
margin: auto;
margin-top: 50px;
width: 700px;
}

#logo {
border-bottom: 1px solid #999999;
float: left;
padding: 5px;
width: 50%;
}

Page: http://obolopo.com/index.html.
Background image made in: Fireworks 8.
Extension: JPEG.

Thanks in advance.

koyama
01-30-2007, 02:05 AM
When you link to an external css file, relative url's in the css file are taken relative to the css file itself and not to the 'executed' html document.

You will need to change this in your css


body {
background-image: url('design/images/background.jpg');
}

to this:


body {
background-image: url('../images/background.jpg');
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum