stevengreen22 Posted December 11, 2011 Share Posted December 11, 2011 Hi guys, Thanks for taking the time to read. I'm working on a project and was just"polishing" things. I found an awesome background image that I want stretched. I've got this to work but then it wouldn't validate. I then contained it within another div but it seems to be sitting on top of all of the others even when I've set the z-index to negative. Can you please help? I have... html { height:100%; margin:0; padding:0; } #bg { position:fixed; top:0; left:0; width:100%; height:100%; z-index: -999; -moz-background-size:100% 100%; /* Firefox 3.6 */ background-size:100% 100%; background-repeat:no-repeat; background-image:url(btest2.jpg); } body { width:100%; height:100%; margin:0; padding: 0; font-family: arial, helvetica, sans-serif; height:100%; position:relative; for the css and </head> <body> <div id ="bg"> <div id="wrapper"> <div id="header"> is the relevant part of the html. Many thanks! Quote Link to comment https://forums.phpfreaks.com/topic/252944-100-background-image-is-rendering-page-uselesshelp/ Share on other sites More sharing options...
ebruggema Posted December 13, 2011 Share Posted December 13, 2011 Have you tried to close the div for the background <div id="bg"></div>? Quote Link to comment https://forums.phpfreaks.com/topic/252944-100-background-image-is-rendering-page-uselesshelp/#findComment-1297402 Share on other sites More sharing options...
nano Posted December 15, 2011 Share Posted December 15, 2011 Without seeing the whole of the code it's hard to see what the issue is, however it could be because you have a space when setting the id on bg (between id and =). Quote Link to comment https://forums.phpfreaks.com/topic/252944-100-background-image-is-rendering-page-uselesshelp/#findComment-1298015 Share on other sites More sharing options...
scootstah Posted December 15, 2011 Share Posted December 15, 2011 Why don't you just stick it to the body? body { background:url(btest2.jpg) no-repeat; } Quote Link to comment https://forums.phpfreaks.com/topic/252944-100-background-image-is-rendering-page-uselesshelp/#findComment-1298321 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.