Results 1 to 3 of 3

Thread: How can I overlay div

  1. #1
    Join Date
    Jan 2009
    Posts
    55

    How can I overlay div

    I am trying to create a mashup. Is there a way to overlay a div so that everything is contained in a main DIV which holds the background image.

    For example you have a static web page. When a user goes onto a page a the background image applies to the "main" div. I want at the side of a button to show a div that contains a rss feed when the user click on a title of a post in the feed .

    How can achieve this?

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: How can I overlay div

    You can set an absolute position, width, height and z-index to a div. Try adding:

    position:relative;
    to your css for #bgimage. Z-index won't work without it.

  3. #3
    Join Date
    May 2008
    Posts
    685

    Re: How can I overlay div

    I can't explain how to overlay divs but I will just provide a small bit of code which might help you:

    HTML Code:
    <style>
    
    HTML, BODY { height: 100%; }
    
    div.pagewrapper { width: 100%; height: 100% overflow: auto; }
    div.overlay {
    position: absolute; left: 100px; top: 100px;
    background: lightblue;
    }
    
    </style>
    
    <body>
    
    <div class='pagewrapper'>
    Your content goes here, put enough in to make it scroll! Some of that Lorem Ipsum rubbish should do.
    </div>
    
    <div class='overlay'>This should stay where it is!</div>
    
    </body>

Similar Threads

  1. VLC 1.1 XV Video Overlay not working well on Linux
    By Dilip Talreja in forum Windows Software
    Replies: 3
    Last Post: 21-11-2010, 05:17 AM
  2. RivaTuner overlay bug with Steam
    By Acolapissa in forum Hardware Peripherals
    Replies: 5
    Last Post: 13-04-2010, 02:33 PM
  3. Block overlay ads
    By fastrod in forum Technology & Internet
    Replies: 3
    Last Post: 28-07-2009, 03:39 PM
  4. Video Overlay problem
    By Danior in forum Monitor & Video Cards
    Replies: 2
    Last Post: 25-03-2009, 01:31 PM

Tags for this Thread

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
  •  
Page generated in 1,713,533,776.48835 seconds with 16 queries