Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Expanding Images (FP2002)

    In a page I am setting up I have to condense down photos and images to fit a 640x480 screen but when viewed on a larget screen they look far too small and surrounded by white space. Is there some way of providing for the images to expand and contract automatically with different screen resolutions as you can with tables and type?

    Roger

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Expanding Images (FP2002)

    Without suggesting that you lift the code wholesale, it might be educational to review the function ResizePhoto in a page at WebShots (it's a manual resize option, but there must be some way that it decides the size "Fit Window"). Here's one of my "fun travel pics": Fishermen racing the sunrise at Cabo Pulmo (emboss effect)

  3. #3
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Expanding Images (FP2002)

    I would suggest you need to resize the image based on the browser window size, rather than the screen size. Not everyone browses in full screen mode - I certainly don't!

    Try this Dynamic Sized Image script from the JavaScript Source.

  4. #4
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Expanding Images (FP2002)

    Thanks Lief, just what I was looking for.

    Roger

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Expanding Images (FP2002)

    I have just about got that windows resizer working but there are just two hitches that have me baffled.
    1) I can get the image to position itself left or right but not center! I have tried "middle", "centre" and "center" in javascript but it always ends up on the left (unless I type in "right").
    2) The image does not show up in the Normal view under Front Page 2002....no sign of it all, not even a space where it should be! Yet it shows up in Preview, Preview in browser, and in the browser itself. Using IE 6.0, active X scripting enable, javascript enabled in FP under page options and other options

    Roger

  6. #6
    Star Lounger
    Join Date
    Jan 2001
    Location
    PA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Expanding Images (FP2002)

    To show the placeholder for the image choose "reveal tags" from the "view" menu. If the image is written into the code then you won't see the image in normal mode because normal mode is looking at the code before it is processed.

    As far as the centering of the image...I have no clue.

  7. #7
    Star Lounger
    Join Date
    Jan 2001
    Location
    PA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Expanding Images (FP2002)

    Upon further inspection of the code, I notice there is a line that says

    if(aln == null) aln = "left";

    Maybe try changing it to:

    if(aln == null) aln = "center";

    and see what happens.

Posting Permissions

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