943,846 Members | Top Members by Rank

Ad:
Sep 2nd, 2008
0

Two background images on one page

Expand Post »
Hi everyone

Just curious to know if anyone has a technique to accomplish this. I've tried having one image as the background on the html tag and one on the body tag. Problem is that I'd like to have them static and the minute I do that the html tag's bg colour cuts the body tag's bg image out at the bottom after scrolling below the initial view of the page.

CSS Syntax (Toggle Plain Text)
  1. body {
  2. margin-top:0px;
  3. height:100%;
  4. background:url(../images/bg_center.gif);
  5. background-repeat:no-repeat;
  6. background-position:left bottom;
  7. background-attachment:fixed;
  8. }
  9. html {
  10. margin-top:0px;
  11. height:100%;
  12. background:url(../images/bg_right_rome.jpg);
  13. background-repeat:no-repeat;
  14. background-position:right top;
  15. background-attachment:fixed;
  16. background-color:#E5D2A6;
  17. }

I'm trying to get an image on either side of the table. I know I could have accomplished this simply by having a 3 column table but I've designed the site so that the full 774 pixel area is used for content and I'd like to allow users with 800x600 resolution to view the site without having a sidewards scroll bar at the bottom of their page. Simply put, if they are running 800x600 they wont see the side bg images. If they're running a higher resolution then they will.
Similar Threads
Reputation Points: 18
Solved Threads: 2
Posting Whiz
Venom Rush is offline Offline
325 posts
since Oct 2007
Sep 5th, 2008
0

Re: Two background images on one page

Hi,

I'm not sure if I understood you correctly, but have you tried playing with z-index?
Reputation Points: 10
Solved Threads: 1
Light Poster
Mylena is offline Offline
30 posts
since Jul 2007
Sep 8th, 2008
0

Re: Two background images on one page

I've ended up using a div on either side of the content table with background images inside them.
Reputation Points: 18
Solved Threads: 2
Posting Whiz
Venom Rush is offline Offline
325 posts
since Oct 2007
Sep 9th, 2008
0

Re: Two background images on one page

for background-color: (color); make it background-color: transparent; that should work. If not send us ur whole code to help
Reputation Points: 11
Solved Threads: 6
Junior Poster in Training
MelechM is offline Offline
55 posts
since Sep 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Help on pricing out basic html and php maintenance for client
Next Thread in HTML and CSS Forum Timeline: Unordered list problem in IE, first item displaced





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC