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 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jul 2005
    Location
    Guildford, UK
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    2 background images

    i would like 2 or more images. one across the top and one down the side.
    ive got as far as

    BODY {
    background-image: url('picts/background-main.gif');
    }

    and this places the one image correctly down the side. but how do i use 2 images? i cant do background-image: url('the other pic'); can i ?

    cheers

  • #2
    Regular Coder
    Join Date
    May 2005
    Location
    Michigan, USA
    Posts
    566
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nope. You would have to make another div inside the area and position it absolutly to 0,0
    Note: I do not test code. I just write it off the top of my head. There might be bugs in it! But if any thing I gave you the overall theory of what you need to accomplish. Also there are plenty of other ways to accomplish this same thing. I just gave one example of it. Other ways might be faster and more efficient.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Victoria, BC, Canada
    Posts
    962
    Thanks
    0
    Thanked 1 Time in 1 Post
    Supposedly the CSS3 spec allows for multiple background images in a single element. Could be very useful (e.g. sliding doors with one element instead of two), but it's probably still a ways away from being usable.

  • #4
    Regular Coder
    Join Date
    Jul 2005
    Location
    Guildford, UK
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts
    see uv lost me now...im a proper noob, where do the divs go? do i use them in the css script or html?

    lol

  • #5
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can also give the html a background.

    html { background: url(blah.jpg) top; height: 100% }
    body { background: url(blah2.jpg) left; height: 100% }

  • #6
    Regular Coder
    Join Date
    Nov 2004
    Location
    The Netherlands
    Posts
    551
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nest your html elements. Eg give an extra <em><i> or<b> and style the bg on that. (you do need to make it a block element though)
    Last edited by mrruben5; 08-25-2005 at 06:49 PM.
    CATdude about IE6: "All your box-model are belong to us"


  •  

    Posting Permissions

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