The shift occurs due to the appearance of the vertical scrollbar. Additionally, in Firefox, the image associated with "barcelona" appears in the wrong location. It is possible that the previous images are not properly removed before the next one is displayed, causing it to appear below?
Despite the issue with image positioning, a positive aspect is having overflow-y:scroll
applied to html
. This ensures that the scrollbar is always visible (even if it may not be aesthetically pleasing), preventing page shifting when navigating between pages of varying lengths (some displaying scrollbars and others not).