Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default BackGround Image

    Hello All,

    Anyone know how to get a static background on the front page ?

    <body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?> BACKGROUND="images/frontpage/backgrounds/background1.jpg" BGPROPERTIES=FIXED>


    will not load the image.

    Thx,
    Erick

  2. #2
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: BackGround Image

    You wouldn't hard code a background image into your php files like this. It's a simple CSS matter. Google "CSS fixed background" and you'll find that Google is your friend :)

  3. #3
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Re: BackGround Image

    such as

    <style type="text/css">
    body {
    background-image:url('images/frontpage/backgrounds/background1.jpg');
    background-repeat:no-repeat;
    background-position:center top;
    }
    </style>
    Last edited by gloerick; 19 Dec 2012 at 10:48 PM.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: BackGround Image

    such as
    Yes but add to the ZenCart stylesheet

  5. #5
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Re: BackGround Image

    Any way to keep the background from scrolling ? keep it static.

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: BackGround Image

    Try adding this
    Code:
    background-position: fixed;

  7. #7
    Join Date
    Nov 2012
    Posts
    4
    Plugin Contributions
    0

    Default Re: BackGround Image

    wow its good thread!


  8. #8
    Join Date
    Dec 2012
    Posts
    11
    Plugin Contributions
    0

    Default Re: BackGround Image

    Hi
    This is the css I am using it loads a background image and stretches it to fit the screen.
    Add to stylesheet.css in the body{}

    {background-color: transparent; /*not required but useful*/
    background-image: url(http://www.yoursite/images/yourimage.jpg); /* your image*/
    background-repeat: no-repeat; /*can be set to repeat-y or repeat-x*/
    background-attachment: fixed; /*make image static*/
    background-position: center top; /*set the start position of image*/
    background-clip: border-box;
    background-origin: padding-box;
    background-size: 100% 100%; /*set screen area for image stretch*/
    }

 

 

Similar Threads

  1. Background image cover entire background w/one image
    By oxicottin in forum Templates, Stylesheets, Page Layout
    Replies: 43
    Last Post: 3 Apr 2012, 03:18 PM
  2. add background image to a attribute then have that background image act as hyperlink
    By sike1234 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 14 Nov 2008, 05:38 PM
  3. How to Change Background Colour to Background image
    By ittybittykitty in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 9 Aug 2008, 04:36 PM
  4. Background Image & Background Color
    By jben in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Mar 2008, 01:11 AM

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