Jump to content

[SOLVED] 2 background images


peranha

Recommended Posts

I am trying to get 2 background images to work on my page, but cannot, the page loads with just one image, but give me white background with 2 images.

 

a:link, a:visited, a:hover {
color: RED;
}

head {
background: #C0C0C0;
height: 50px;
}

body { 
background: url(../pics/header.JPG), url(../pics/body.JPG);
}

 

That is what I have, and it doesnt work.  Tried with quotes around the path, and that didnt work either.

Link to comment
https://forums.phpfreaks.com/topic/80062-solved-2-background-images/
Share on other sites

What I want is to have the header of the page to show the head.JPG pic, and the body to show body.JPG.  I tried to set the head.JPG in the head section, but it just showed the body.JPG pic.  So I looked up on W3.org, and this is the way that they said to do it, so I tried it, and it didnt work this way either.  If you could give me an example that would be great.  Thanks in advance.

do it like this:

 

<html>
<head>
<style type="text/css">
a:link, a:visited, a:hover {
color: RED;
}

#head {
background: #C0C0C0;
height: 50px;
        background: url(../pics/header.JPG);
}

body { 
url(../pics/body.JPG);
}
</style>

</head>
<body>
<div id="head">

</div>
</body>
</html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.