Results 1 to 4 of 4

Thread: positioning an image over a frame or iframe?

  1. #1
    Join Date
    Oct 2006
    Location
    Shanghai, China
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default positioning an image over a frame or iframe?

    Hi,

    I want to position an image over a frame or iframe so that the contents of the frame/iframe can move up and down, back and forth, but the image doesn't.

    Anyone know how I can I do this?

    Thanks!

    Joe

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    if you put an image over the frame/iframe whatever image you put there will hide whatever is in the content of the frame, unless the image itself has opacity set to allow transparency. if this is truly what you want, then you need to use some absolute / fixed css positioning on the image.
    Code:
    <style type="text/css">
    img#overlap {
          postion: fixed;
          top: 100px;
          left: 100px;
    }
    <img id="overlap" width="100" height="100" alt="overlap image" title="overlap image">
    I am guessing what you are attempting to do is create an image that will sit fixed behind ? a frame so that the image stays the same while the user can still see the content in the foreground ?
    Code:
    <style type="text/css">
    iframe#whatever {
            background: #000 url('/path/to/file.extension') no-repeat fixed center;
    }
    </style>
    
    <iframe id="whatever" src="something.htm">

  3. #3
    Join Date
    Oct 2006
    Location
    Shanghai, China
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by boogyman View Post
    I am guessing what you are attempting to do is create an image that will sit fixed behind ? a frame so that the image stays the same while the user can still see the content in the foreground ?
    Thanks

    I have a frame that moves around every time a viewer clicks on a link, but I want an image (a dot or something) to indicate where the user is.

    I've been reloading the page each time and using PHP to create the dot inside the page, but I thought it would be smoother and faster to overlay the frame with a transparent and immobile image with a dot and have the frame move around under it using bookmarks instead of reloading.

  4. #4
    Join Date
    Oct 2006
    Location
    Shanghai, China
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    This is what I got so far:

    Code:
    <html>
    <head>
    <style type="text/css">
    frame#frame6 {
            background: #000 url('/images/overlay.gif') no-repeat fixed center;
    }
    </style>
    </head>
    <frameset rows="*" cols="*">
    <frame src="frames/frame6.php" name="frame6" class="frame6">
    </frameset>
    </html>
    Doesn't seem to work. What did I do wrong?

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
  •