Results 1 to 2 of 2

Thread: overlay image on top??

  1. #1
    Join Date
    Aug 2006
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default overlay image on top??

    if i use divs

    .image1{background-image: (url); }
    .image2{background-image: (url); }

    <div class="image1">
    <div class="image2"></div>
    </div>
    how do i make it so that the image 2 sticks over the top and ABOVE image1 ie image 2 is twice the height of image1

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try this:
    HTML Code:
    <style type="text/css">
    .image1{
       position: absolute;
       z-index: 2;
       background-image: (url);
    }
    .image2{
       position: absolute;
       z-index: 1;
       background-image: (url);
    }
    </style>
    <div class="image1">
    <div class="image2"></div>
    </div>
    Jeremy | jfein.net

Bookmarks

Posting Permissions

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