1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? - JavaScript? Something else?

Discussion in 'HTML, Graphics & Programming' started by gord, 2 Jun 2006.

  1. gord

    Capodecina

    Joined: 18 Oct 2003

    Posts: 19,367

    Location: Midlands

    Id just like to know if its possible to position a users view of an image using JavaScript or similar?

    What i want to do is have a photo and then when a friend visits the site, have it display the centre of the photo and they then have to scroll around it..

    is that impossible?
     
  2. sparkymark75

    Mobster

    Joined: 8 Jan 2003

    Posts: 2,981

    Location: Scotland

    Not sure if I follow what you mean but you can put it in a div and set the size of the div smaller than the photo. Or you could use an iframe.
     
  3. gord

    Capodecina

    Joined: 18 Oct 2003

    Posts: 19,367

    Location: Midlands

    Well, imagine you were using 1280x1024 resolution, and had a 1600x1200 picture displayed in a website. The site would load, and you would have to scroll right and down to view the rest of the image.

    Could you make it so that the screen was actually positioned in the middle of the picture so that the user had to scroll up/down/left/right to view the rest?
     
  4. RobH

    Mobster

    Joined: 9 May 2005

    Posts: 4,524

    Location: Nottingham

    Not heard of it being done before but I'm sure you could do it somehow. It's more likely to involve an Iframe though because all browsers handle images differently. For example, IE shrinks images that are too large to fit into the window, also you can't guarantee that people are browsing in a full screen window.