Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Screen Res repeating images to the edge of the screen?
Old 08-11-2009, 03:06 PM Screen Res repeating images to the edge of the screen?
Snot's Avatar
Super Talker

Posts: 132
Name: Chase
Trades: 0
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.

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.
__________________

Please login or register to view this content. Registration is FREE
Snot is offline
Reply With Quote
View Public Profile Visit Snot's homepage!
 
 
Register now for full access!
Old 08-11-2009, 03:19 PM Re: Screen Res repeating images to the edge of the screen?
angele803's Avatar
Perfectly Imperfect

Posts: 1,774
Name: Stephanie
Location: Oklahoma
Trades: 2
Try applying the background image to the body
Just add this to your css:
Code:
body{
background: url(images/bodybackground.jpg) repeat;
}
__________________

Please login or register to view this content. Registration is FREE
angele803 is offline
Reply With Quote
View Public Profile
 
Old 08-11-2009, 03:26 PM Re: Screen Res repeating images to the edge of the screen?
Snot's Avatar
Super Talker

Posts: 132
Name: Chase
Trades: 0
I've tried that it just replaces the background image I have in the body.

Do you know of a way I can have two background images in the body and set one on top of the other?

Right now i have three images on top of each other
sky, grass, and dirt in body
sun and clouds in sun
and flowers in flowers

when I add a 2nd background image to body it replaces it. The sun and flowers are still there but I don't know how to place the sky, grass, and dirt image on top of the one that repeats both x and y.

Quote:
body{
padding: 10px;
font-family: Arial, Helvetica, sans-serif;
background: url(images/header_bg.jpg) repeat-x;
text-align: center;
height: 248px;
}

h1{
padding: 0px; margin: 0px;
}
#sun {
background-image:url(images/sun.gif)
margin-top: 0px;
text-align: left;
padding-bottom: 27px;
}
#flowers {
background: url(images/flowers.gif) repeat-x;
margin-top: 10px;
margin-left: 0px;
height: 50px;
}
__________________

Please login or register to view this content. Registration is FREE
Snot is offline
Reply With Quote
View Public Profile Visit Snot's homepage!
 
Old 08-11-2009, 03:32 PM Re: Screen Res repeating images to the edge of the screen?
angele803's Avatar
Perfectly Imperfect

Posts: 1,774
Name: Stephanie
Location: Oklahoma
Trades: 2
I see now. Okay, here is what I would do.

Change your body to this in your css
Code:
body{
	padding: 0; 
	margin: 0;
	font-family: Arial, Helvetica, sans-serif;
	background: url(images/bodybackground.jpg) repeat;
	text-align: center;
}
wrap your sun and flower divs in a header div like this:
Code:
<div id="header">
    <div id=sun>
        <img src="images/sun.gif" width="800" height="130" alt="Sun Shine">
        <div id=flowers><img src="images/flowers.gif"></div>
    </div>
</div>
Add a style for #header in your css like this:
Code:
#header{
	background:url(images/header_bg.jpg) repeat-x;
}
__________________

Please login or register to view this content. Registration is FREE
angele803 is offline
Reply With Quote
View Public Profile
 
Old 08-11-2009, 03:39 PM Re: Screen Res repeating images to the edge of the screen?
Snot's Avatar
Super Talker

Posts: 132
Name: Chase
Trades: 0
You are AMAZING!!!!

Thanks so much for the help!!!
__________________

Please login or register to view this content. Registration is FREE
Snot is offline
Reply With Quote
View Public Profile Visit Snot's homepage!
 
Old 08-11-2009, 10:03 PM Re: Screen Res repeating images to the edge of the screen?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
You really don't need the repeat property as that IS the default
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Screen Res repeating images to the edge of the screen?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36523 seconds with 12 queries