Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29
  1. #11
    Join Date
    Feb 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: CSS Question - Multiple Background Images

    I'm curious about this for the side boxes and header/footer ez-link bars. I know that some nav bars and side boxes utilize multiple images in order to do the sides and center giving the entire bar a more rounded appearance. Not too sure how to apply this though as I'm self-taught. Any suggestions? I know ordinarily it involves coding similar to this:

    background-image: url(../images/1.gif) top left no-repeat, url(../images/tile_back2.gif) top right no-repeat, url(../images/3.gif) left repeat-x;

    However, this has no apparent effect in the stylesheet.css and will cancel the original image. Although I know this was originally a CSS2 concept, it is not integrated in the majority of browsers and I'd love to integrate this into my current site if anyone has some insight into how to do it. Something similar to what others have done, as with this commercial site:

    osc3.template-help.com/zencart_20850/index.php

    Thoughts? Thanks!
    Last edited by Kim; 23 Nov 2009 at 07:12 AM.

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

    Default Re: CSS Question - Multiple Background Images

    For any element with a fixed width and height (usually true for sidebox headings), you can use a single background. For flexible-width elements, you may need to add extra wrapper divs inside the original ones so you can apply the "sliding doors" effect.

  3. #13
    Join Date
    Feb 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: CSS Question - Multiple Background Images

    Hmm, thanks for that answer, Glenn! One snag I've run into is when I've attempted to add additional div lines inside div wrapper, it merely added an additional line below the original. I had attempted to add a div line by this method:

    <div id="navEZPagesTopRight">
    </div>

    inside the ez header nav bar within the tpl_header.php file.

    Could you give a example of what you mean? I'm assuming you do not mean in the stylesheet.css and instead in the .php file as I had tried.

    Thanks again, Glenn!
    Last edited by fierystorm; 23 Nov 2009 at 07:39 AM.

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

    Default Re: CSS Question - Multiple Background Images

    When you add a wrapper div inside another one, you need to find the closing </div> of the original and add your new </div> just before that.

  5. #15
    Join Date
    Feb 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: CSS Question - Multiple Background Images

    Hmm... When I attempt to do that it adds an additional line just underneath my original background image and also cuts off part of that original background image in my nav bar. Do you see anything I'm doing wrong located with the css?

    This is the code I attempted to add within the current div wrapper:

    <div id="navEZPagesTopRight">
    </div>

    Here is the css I'm using along with the original:

    #navEZPagesTop {
    background-image: url(../images/tile_2.gif);
    background-repeat: no-repeat;
    background-position: top left;
    min-height: 20px;
    font-size: 1.10em;
    font-weight: bold;
    margin: 0em;
    padding: 0.5em;
    }

    #navEZPagesTopRight {
    background-image: url(../images/tile_1.gif);
    background-repeat: no-repeat;
    background-position: top right;
    min-height: 20px;
    font-size: 1.10em;
    font-weight: bold;
    margin: 0em;
    padding: 0.5em;
    }

    Thanks again for your answers, Glenn!

  6. #16
    Join Date
    Feb 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: CSS Question - Multiple Background Images

    Any thoughts? Appreciated! Thanks!

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

    Default Re: CSS Question - Multiple Background Images

    Out of time now... I'll be back after the Thanksgiving weekend.

    You are not really putting the </div> immediately after its opening <div ...> tag, are you?

  8. #18
    Join Date
    May 2009
    Posts
    45
    Plugin Contributions
    0

    Default Re: CSS Question - Multiple Background Images

    here's a dumb question - and I've been all over this forum, typing my queries in different ways but keep coming up with the same answers that don't apply. I found the code once a while back but forgot to bookmark it.

    How and where do I add a site wide background image to every page? I don't mean in the body but behind everything. I have a small gif that will have to be repeated.

    Any help will be appreciated!

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

    Default Re: CSS Question - Multiple Background Images

    "In the body" *is* "behind everything".

    Assuming you really mean that you want the gif repeated all over the screen behind all other content, borders, etc., you would add your gif as a background to the body rule in
    /includes/templates/your_template/css/stylesheet.css.
    Code:
    body {
        background: url(../images/yourimage.gif);
        }
    Add the background line to the "body {" rule already in the stylesheet.

    Save the image to /includes/templates/your_template/images/.

  10. #20
    Join Date
    May 2009
    Posts
    45
    Plugin Contributions
    0

    Default Re: CSS Question - Multiple Background Images

    Oy, it's so simple. One day I'll know it well :)

    Thank you, Glenn.

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Multiple background images?
    By jagall in forum Templates, Stylesheets, Page Layout
    Replies: 17
    Last Post: 11 Jul 2011, 09:17 AM
  2. Trouble with CSS background images
    By Wilbo in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 13 May 2009, 11:05 AM
  3. CSS for different page background images
    By jsteelethg in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 7 Mar 2007, 12:53 AM
  4. using background images in css
    By jas99villa in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 7 Feb 2007, 10:01 PM
  5. Customizing background...not simple CSS change question...
    By g0hst in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 20 Jun 2006, 08:46 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