Jump to content

Background Always Same Size As Page Help


slashjack

Recommended Posts

Hi everyone, im sure this has been covered already, however i cant find it. How do you get an image to always be the size of a page, for example you have the body 800px but behind this is the background im talking about. Hope this makes sense! Thanks guys

Link to comment
Share on other sites

To fix that just go/make a .css file.In side the css file put this:

html, body{margin:0;padding:0;}

----------------------------------------------------

Css3
background-size:100% 50px

can do that, but its not yet standard. or try using

<img src="bgImage.png" style="width:100%; height:50px" position:absolute; z-index:-999/>

Is Background-Size: widely supported by Chrome, Firefox, Opera, IE, etc. now? Last I read it was hardly supported.
Link to comment
Share on other sites

The margin and padding really doesnt work...it makes the whole thing odd, my css file is this...
 .bg {z-index:-999;position:absolute;height:100%;width:100%margin:0;padding:0;}

The margin and padding have to be on the <html> and <body> elements.html, body {margin: 0;padding: 0;}
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...