PrivateUser
PrivateUser

Reputation: 4544

CSS pixel shifting issue. Page shifting to some pixels and then back normal

I have some problem in CSS. Check this page. If you click "Barcelona" link in that page you can see the whole page shifting to 10 pixels right and come back to normal. Why its happening? Any help? Thanks

Upvotes: 2

Views: 219

Answers (2)

afaf12
afaf12

Reputation: 5436

Image which is loaded when you click "Barcelona" is wider than it's container. You either reduce width of that image or make the image container a bit wider.

Upvotes: 1

Litek
Litek

Reputation: 4888

It shifts because of vertical scrollbar showing up. Also the image corresponding to "barcelona" shows in wrong place in firefox. Maybe the old images isn't removed before next one shows, and that forces it to be displayed below?

Apart from the image positioning, a good thing is have overflow-y:scroll set on html. It will force the scrollbar to be always visible (I know maybe not the nicest look) but in exchange the page won't be shifting when navigating to different pages (some may be long, and thus scrollbar shows, some not and have no scrollbar)

Upvotes: 3

Related Questions