Help - Search - Members - Calendar
Full Version: How to repeat a background image to 100% width?
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
NovaArgon
Hello,


I'm trying to get my background image to repeat x and y and go to the left, right, and bottom of the screen regardless of what screen res someone uses.

Right now there is a gap I can't fix.

I can use -20px left and right margins to make it look right on my screen res but that doesn't work at the bottom of the page and larger screen res's still have a gap. Plus this makes small screen res's have a scroll bar.

How do I make the background image repeat off the page regardless of screen res?

here is a link to my site
http://www.pgzz.gamerunion.com

here is the css code in question.

QUOTE

#container{
background: url(images/bodybackground.jpg) repeat;
margin-left: 0px;
margin-right: 0px;
margin-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-bottom: 0px;
margin: 0%;
}


I've tried everything I can think of.

Thanks for the help.




edit solved

Darin McGrew
Where is the gap? In which browser(s) do you see the gap?
NovaArgon
Hi Darin,

I've actually got passed that problem onto a new one. I managed to get the box created and it expands down as I add more content and expands left and right with screen res.

I found out that the box was breaking with any screen res over 1600px wide.

To fix it i added max width 1600px to the box and I think it may have solved the problem. I just can't test it because my screen res only goes up to 1600.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.