View Full Version : Background image and screen size problem

Oct 29th, 2010, 05:55 PM
I'd be so apreciative if someone could point me in the right direction as Ive been ill and have missed tutorials and have a submission deadline fast approaching.
I want the background image to fill the screen but am I right in thinking this is not such a good idea? How can I get rid of the white both on sides and the bottom of the page. I intend to centre all the content on the page but this is also proving to be difficult.
Thanks in advance.

Oct 29th, 2010, 06:00 PM
Is that a background image you created? Also is it set as the background on the body tag in your stylesheet? You can tile an image and set it as the background of the body.

Oct 29th, 2010, 06:06 PM
Yes I created a background image, 990px x 700px which is in the body tag.. It is unfortunatly not tilable as edges are darker than the interior.

Oct 29th, 2010, 06:14 PM
Here (http://www.quackit.com/html/codes/html_stretch_background_image.cfm)is an article I found. Might help.

Oct 29th, 2010, 06:53 PM
Thanks, I gave it a shot but it seemed to mess things up a bit. I think it would be better to centre the image and have a background colour for the surrounding edges but Im not sure how to approach this as Ive already set a background image?

Oct 29th, 2010, 07:09 PM
Again, to do this you could style the <body> tag with a background color of blue to match the image. Then have a div named wrapper around your code starting inside the body tag and ending before the closing body tag and then in your style sheet give the wrapper div an background image.

So it would be

<div id="wrapper">

all page content goes here


Then the styles would look something like this:

body {
background-color: whatever color comes close;

#wrapper {

Major Payne
Oct 30th, 2010, 07:56 AM
Maybe this...

Background to Fit Screen II: http://paynelessdesigns.pastebin.com/f760990b