displaying images properly and javascript

ok so, I have a website that I want to put all of my photos on, and so far I have a portrait section, however, it doesn’t display properly, I want it in rows just so it looks neat and tidy, and also when you click on the image it opens it up bigger at the bottom of the page when an image is clicked, I want the page to automatically go down to the image, but also I want it to open a different image, so I can have the high res being displayed at the bottom, and I know for this is all CSS and javascript, but I’m not overly too sure about these.