Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2005
    Location
    Brooklyn NY
    Posts
    507
    Plugin Contributions
    0

    Default Can I have 2 background images?

    I wanted to see if I could have 2 background images I tried to do it in a CSS3 way
    Code:
    body {
    	margin: 0;
    	font-family: verdana, arial, helvetica, sans-serif;
    	font-size: 62.5%;
    	color: #000000;
    	background-color: #666666;
    	background-image: url(../images/backtop.png), url(../images/backgroundimage.jpg);
    	background-position:top center; 
    	background-repeat: no-repeat, repeat-y;
    	}
    and it only shows up on the newest verison of safari but not in firefox or IE then I

    then I tried it another way and none of the backgrounds show up
    Code:
    html {
    	    background: #000 url(../images/backgroundimage.jpg);
    	}
    
    body {
    	margin: 0;
    	font-family: verdana, arial, helvetica, sans-serif;
    	font-size: 62.5%;
    	color: #000000;
    	background-color: #666666;
    	background-image: url(../images/backtop.png);
    	background-position:top center; 
    	background-repeat:repeat-y;
    	}

    Can some one show me how to do this in zencart so it will show up on all browsers?

  2. #2
    Join Date
    Dec 2009
    Posts
    10
    Plugin Contributions
    0

    Default Re: Can I have 2 background images?

    set up your body with the main background.

    then create a div that contains your second background.


    example

    Code:
    body {
    	margin: 0;
    	font-family: verdana, arial, helvetica, sans-serif;
    	color: #000000;
    	background-color: #990000;
    	font-size: 11px;
    	padding: 0px;
    	background-image: url(../images/bg1.jpg);
    	background-position: bottom;
    	background-repeat: repeat-x;
    	}
    
    #layout {
    	background-color: #FF0000;
    	background-image: url(../images/bg2.jpg);
    	background-repeat: repeat-x;
    	width: 900px;
    }
    Your html would be:

    Code:
    <body>
    
    <div id="layout">content goes here content goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes here</div>
    
    </body>

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Can I have 2 background images?

    Note: if you have a background-color in #layout, it will cover the background in body (at least to the width of #layout). The upper layers need transparent backgrounds with partial-coverage images.


    If your site is 100% width, you can use body and #mainWrapper. This is a standard method with existing elements.
    Last edited by gjh42; 9 Dec 2009 at 09:56 AM.

 

 

Similar Threads

  1. How can i change my background images?
    By lcloja in forum Customization from the Admin
    Replies: 1
    Last Post: 10 Apr 2012, 05:11 PM
  2. Possible to have different background images for each category?
    By Twaddle in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 28 Sep 2011, 11:35 AM
  3. Left and right screen of my Zencart I have a blueish background, can I put a photo?
    By popemil in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 25 Aug 2010, 01:18 PM
  4. Can I have a separate background for product listings?
    By touchclothing in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 30 Jan 2010, 04:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR