Need help in CSS

Discussion in 'CSS' started by Abhik, Feb 23, 2008.

  1. #1
    How can I set two different background image for a single div id?

    I want the first image appear at top with no-repeat but the second image will be repeated.. something like this..

    [​IMG]
    Can anyone help me?
     
    Abhik, Feb 23, 2008 IP
  2. Suzy

    Suzy Peon

    Messages:
    27
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can't, not yet anyway, you can in CSS3 but until then it needs at least two elements to achieve the look

    <div id="wrapper">
    <h1>.. header</h1>
    </div>

    apply the repeating image to the "wrapper" div, then apply the top, non-repeating, one to the nested element, it needn't be a header it could be a nested div for the purpose, or you might be able to use whatever element comes first in your containing div if it's a constant
     
    Suzy, Feb 23, 2008 IP
  3. lock

    lock Banned

    Messages:
    205
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I would just use 2 div's to do this. Should work with a header div than a content div.
     
    lock, Feb 23, 2008 IP