Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2006
    Posts
    108
    Plugin Contributions
    0

    Default How do I get static b/g with images?

    HI There
    I would love a background like this:

    www.dvdworldusa.com

    with images left and right

    How do I :
    1) get the stylsheet code right?
    and
    2) prepare the image so the sizing is correct!

    My current stylesheet for my (different) fixed background isthis:


    body {
    margin: 0;
    font-family: verdana, arial, helvetica, sans-serif;
    font-size: 62.5%;
    color: #077090;
    background-color: #transparent;
    background-image: url(../images/tileback.jpg);
    background-repeat: repeat-x;
    background-attachment: fixed;}
    }



    Thanks for any help/suggestions!

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: How do I get static b/g with images?

    Usually that kind of thing is done with one big image as the body background with the faces on each side, and a transparent area the same width as your mainWrapper in between.

  3. #3
    Join Date
    Apr 2006
    Posts
    108
    Plugin Contributions
    0

    Default Re: How do I get static b/g with images?

    think I am part way there:

    I viewed source and think this is it:

    background: black url(images/graphics/homepagesleeves/promo_background.jpg) fixed top center no-repeat;

    How woudl I integrate with my existing code?

    Thanks!

  4. #4
    Join Date
    Sep 2004
    Location
    MONTANA!!!
    Posts
    105
    Plugin Contributions
    0

    Default Re: How do I get static b/g with images?

    Put this in your css stylesheet for your template.

    background:black url(images/graphics/homepagesleeves/promo_background.jpg) no-repeat fixed center top;

    That should do it. Give us a url for your site. Would like to see it.

    LOL. I should have refreshed before I finished that reply. ;) Looks like you got it.

  5. #5
    Join Date
    Apr 2006
    Posts
    108
    Plugin Contributions
    0

    Default Re: How do I get static b/g with images?

    Just as I thought! Many Thanks
    Site still in progress (testing) maybe one day, I will finally get there.
    have used the thing as a long learning curve...

    Thanks loads for the help

    Any special rules on the image i use in terms of dimensions etc?

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

    Default Re: How do I get static b/g with images?

    Nope. Background-images are what size they are, and (if smaller than the container) will repeat automatically to cover the whole container unless you specify repeat-x, repeat-y or no-repeat. They start at the top left corner unless you tell them to position elsewhere.

    The smaller the image file, the faster the bg will load; if a repeating image can do what you want, it is better than one big image.

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

    Default Re: How do I get static b/g with images?

    Note: it is recommended to save template images in your custom template folder instead of the main product images folder. So the property would look like this:

    background:black url(../images/promo_background.jpg) no-repeat fixed center top;

    and you would save it as

    /includes/templates/your_template/images/promo_background.jpg.

  8. #8
    Join Date
    Apr 2006
    Posts
    108
    Plugin Contributions
    0

    Default Re: How do I get static b/g with images?

    High Paul and Glenn
    THanks LOADS for your help, it is as I figured but thanks for confirming
    Hope this thread proves useful to others needing a similar effect

 

 

Similar Threads

  1. v139h How to add new menu item with submenu in sidebox with static link..
    By snk060 in forum General Questions
    Replies: 9
    Last Post: 25 Nov 2013, 02:47 PM
  2. Replies: 19
    Last Post: 12 Nov 2012, 07:55 PM
  3. Static banner images !!
    By krisdiamond in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 9 Jan 2011, 10:13 PM
  4. How to replace Header menu with static buttons?
    By perfumbg in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 13 Nov 2010, 06:50 PM

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