Advanced Search

Results 1 to 3 of 3

Thread: Div Overlay

  1. #1
    Join Date
    Jul 2006
    Posts
    64
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default Div Overlay

    I'm looking for a dynamic script that will over lay images or a section of a page. i'm assuming it would work something like this. There would be a main div container then a sub div overlay that would positioned at a preset coordinated within the main div to ovelay the image with text or an watermark image.

  2. #2
    Join Date
    Jul 2006
    Posts
    64
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default

    i kind of found something that would work

    http://www.tutorial5.com/content/view/129/52/

  3. #3
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    It's just a matter of absolute positioning.

    Set the parent div's CSS position to relative, like so:

    Code:
    div#parent { position:relative; }
    then you can position any element with that absolutely RELATIVE to the parent div, not the page.

    Code:
    div#overlay { position:absolute; top:20px; left:20px; }
    <div id="overlay"> would have to be nested inside <div id="parent"> for this to work.

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
  •