I have an HTML document with images in a grid format using <ul><li><img.... The browser window has both vertical & horizontal scrolling.

Question:
When I click on an image <img>, how then do I get the whole document to scroll to a position where the image I just clicked on is top:20px; left:20px ?

I’ve had a browse on here for similar posts…although I’m quite new to JavaScript, and want to understand how this is achieved for myself.

11 Answers
11

Leave a Reply

Your email address will not be published. Required fields are marked *