Jump to content

Recommended Posts

Hi All

 

I've just started putting my website online and I realised one more thing I'd like to do to my site but have no clue where to start.

I have a photo gallery and when the page opens, the page opens from the top so only the top half of the image is shown and the user has to scroll down to view the whole image.

This is what I mean..

http://www.pictiuirshannagh.5gigs.net/photoGallery.php?ID=1

 

Does anyone know how/if to make it so that when the page opens, its positioned so the image is in view and the user doesnt have to scroll down??  So essentially the page will open already scrolled down a bit.

 

I hope this makes sense.

 

Thanks :-)

you can create an HTML anchor

<a name="#scrollHere">

 

but you would then have to add that to your link, IE

<!-- normal link -->
<a href="link.php">link</a>
<!-- anchor link -->
<a href="link.php#scrollHere">link</a>

Yeah, and that is actually relative to screen resolution... when I open it, even without my browser maximized, it opens with the full picture shown.

 

I wouldn't be too worried about it. :)

 

Oh great, thanks for letting me know that. :)

 

Now Im curious though about the anchors.  I was looking at putting those in and I'm a little confused how I would do it since my links are a little more complicated than the examples mikesta gave.  For example, the link I would use to jump to the anchor would be...

<a href=photoGallery.php?ID=$ID>

And this link is in a php file that is an include() in albums.php.

 

Does that make sense?  :confused:

to make a link go to an anchor just add the pound sign plus the name of the anchor to the end of the link. for example

 

<a href=photoGallery.php?ID=$ID#anchor>

 

you could also use javascript I guess... but that may be unnecessary because as Matt said it depends on screen resolution and all that.

 

although I suppose you could use Javascript to detect the resolution of a user, and respond accordingly

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.