peranha Posted December 4, 2007 Share Posted December 4, 2007 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 More sharing options...
AndyB Posted December 4, 2007 Share Posted December 4, 2007 There's a limit of one background image per 'container'. Need two images, try one container inside another. Link to comment https://forums.phpfreaks.com/topic/80062-solved-2-background-images/#findComment-405696 Share on other sites More sharing options...
phpQuestioner Posted December 4, 2007 Share Posted December 4, 2007 you could create a graduate or dual color image for your background image; you could do it that way also. Link to comment https://forums.phpfreaks.com/topic/80062-solved-2-background-images/#findComment-405702 Share on other sites More sharing options...
peranha Posted December 4, 2007 Author Share Posted December 4, 2007 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. Link to comment https://forums.phpfreaks.com/topic/80062-solved-2-background-images/#findComment-405710 Share on other sites More sharing options...
phpQuestioner Posted December 4, 2007 Share Posted December 4, 2007 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> Link to comment https://forums.phpfreaks.com/topic/80062-solved-2-background-images/#findComment-405754 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.