Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2013
    Posts
    15
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Trying to have 2 image background in same wrapper

    I have:

    #wrappertopboxes {
    background: url(../images/bg.gif) center center repeat;
    }

    Which is a little box that repeats to cover the whole wrapper size.
    To this I want to add another image in the middle of the wrapper that will
    not repeat since it's pretty big to cover half the size of the wrapper.

    I tried doing:
    background: url(../images/bg.gif) center center repeat, url(../images/middle_bg.png) center center no-repeat;

    but don't see anything but the first image (bg.gif).

    I need the bg.gif to be the main background image and middle_bg.png to be on top of the bg.gif but only in the middle, and maybe stretch it a bit to make middle_bg.png longer (horizontaly)

    Thanks in advance !!!!

  • #2
    Regular Coder
    Join Date
    Aug 2012
    Posts
    122
    Thanks
    0
    Thanked 25 Times in 25 Posts
    See if this will work for you (replace url with your images), hopes this helps:

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <style> 
    body{
    background: url(img_flwr.gif) 350px 250px no-repeat, url(img_tree.gif) 90px 50px repeat, lavender;	
    };
    </style>
    </head>
    <body>
    </body>
    </html>
    1 Corinthians 15:3-4 / Ephesians 2:8-9 - What or Who are you living for?

  • #3
    New Coder
    Join Date
    Jun 2013
    Posts
    15
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I had them backwards. It work now thanks for the reply !


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •