How can I use 3 images in the background of a div

Discussion in 'HTML & Website Design' started by Webed4it, Sep 24, 2010.

  1. #1
    I want to create a background for my site that consists of a repeatable middle section, a top part and a bottom part. Is it possible to do this in the background property of a div?
    Or I could set the div's background to the repeatble part and use absolute/relative positioning for the top and bottom images but then how do you get them behind the text?

    Thanks for any help
     
    Webed4it, Sep 24, 2010 IP
  2. bybullmoose

    bybullmoose Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Anything is possible. Do you have a visual description (wire frame) of what you're looking for?
     
    bybullmoose, Sep 24, 2010 IP
  3. Rimona

    Rimona Active Member

    Messages:
    123
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    63
    #3
    Rimona, Sep 24, 2010 IP
  4. nzk0

    nzk0 Greenhorn

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #4
    u can use the html, body and a div that gives u three layers :)
     
    nzk0, Sep 24, 2010 IP
  5. g0ld3n.tig3r

    g0ld3n.tig3r Guest

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Create 3 sections(divs) and assign 3 different backgrounds and repeat the background of the middle div. I dont think 3 backgrounds is possible.
     
    g0ld3n.tig3r, Sep 25, 2010 IP
  6. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #6
    Google for CSS multiple backgrounds.
     
    CSM, Sep 25, 2010 IP
  7. ProvideVPN

    ProvideVPN Banned

    Messages:
    114
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Use this html code
    <div class="diva"><div class="divb"><div class="divc">Hello World!!</div></div></div>
    HTML:
    and this CSS code
    
    .diva{ background-image: url('x.jpg') }
    .divb{ background-image: url('y.jpg') }
    .divc{ background-image: url('z.jpg') }
    
    Code (markup):
     
    ProvideVPN, Sep 25, 2010 IP
  8. Isaac J

    Isaac J Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    The way I would do it if I wanted a quick easy solution.

    I would work out how big my div background needs to be...and create one in Photoshop or for the free option Gimp or something like that...

    You would just need to select your images and merge them in to your .psd background....flatten the whole thing and apply it.

    How easy this is, would primarily be dependent on what editor you are using, I personally use dreamweaver and write my own code but the above option
    should be fairly straight forward in most editors.
     
    Isaac J, Sep 27, 2010 IP