lexington
12-17-2008, 08:43 PM
CSS background image stretch across whole page?
Hello, I know about no-repeat CSS value to not make an image repeate itself, however if the background image is too small it will just leave a blank space. Is there a CSS value that stretches the background image to cover the whole background of the page? Oh I just noticed something after creating this topic, the css attribute for the body resizes the image, however the class that the second background attribute is assigned to doesn't make the image cover the whole page. Meaning that:
Quote:
body {
background: url('/test/img_27.jpg') fixed;
}
Makes the image span across the whole page like I want, but:
Quote:
#page {
background: url('/test/img_28.jpg') fixed;
}
Which is a class that goes in the page repeats the image. How can I have the background image span across that background like it does for the body tag?
Last edited by lexington : 12-17-2008 at 07:55 PM.
Hello, I know about no-repeat CSS value to not make an image repeate itself, however if the background image is too small it will just leave a blank space. Is there a CSS value that stretches the background image to cover the whole background of the page? Oh I just noticed something after creating this topic, the css attribute for the body resizes the image, however the class that the second background attribute is assigned to doesn't make the image cover the whole page. Meaning that:
Quote:
body {
background: url('/test/img_27.jpg') fixed;
}
Makes the image span across the whole page like I want, but:
Quote:
#page {
background: url('/test/img_28.jpg') fixed;
}
Which is a class that goes in the page repeats the image. How can I have the background image span across that background like it does for the body tag?
Last edited by lexington : 12-17-2008 at 07:55 PM.
