Results 1 to 5 of 5

Thread: static pictures

  1. #1
    Join Date
    May 2005
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default static pictures

    there are many examples of these, you know the ones that can stay in the bottom right etc. is there a cpecific type of graphic that can do this. if so, what is it, and what programs have the ability to make it

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by spyder
    is there a cpecific type of graphic that can do this.
    This behaviour has nothing to do with graphic format. It's a matter of positioning the image using CSS.

    You have two approaches: using a background image, or positioning an img element. Which one you choose will depend on what effect you're after.

    Code:
    body {
      background: white url(...) no-repeat fixed 97% 97%;
    }
    This would place an image near the bottom right corner of the browser viewport, and it would remain in the same position even if the viewport is scrolled. Other content in the document would always appear on top of the image.



    Code:
    #logo {
      position: fixed;
      bottom: -3%;
      right: -3%;
    }
    This assumes that you have an img element with the id attribute value, logo. It will position this image close to the bottom right corner of the viewport, and it too will remain in position. Most content in the document will appear below this image.

    Unfortunately, IE doesn't support the fixed value for this particular solution (though most other user agents do), and will treat it like absolute instead. You'll have to use a script to keep it in place as the viewport scrolls, though I think the result always ends up looking tacky.

    Mike

  3. #3
    Join Date
    May 2005
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Mike is so right about IE's lack of support for the fixed declaration for the position element. To be even clearer, it will work for page backgrounds but not for any other page elements. I would differ on the subject of 'tacky looking' for scripts that will do this. One in particular I just modded, uses a floating routine so that the image doesn't jerk around. It is different than fixed positioning but applied judiciously under the right circumstances can be very nice. The code is attached as jlogo.zip to this message:

    http://www.dynamicdrive.com/forums/s...=9803#post9803
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    I would differ on the subject of 'tacky looking' for scripts that will do this.
    I didn't mean to imply that every single implementation is tacky, but the majority do jump around and look unprofessional.

    Mike

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
  •