Why is the page shifting to top with a container that has overflow:hidden ?
Posted
by Maher4Ever
on Stack Overflow
See other posts from Stack Overflow
or by Maher4Ever
Published on 2010-06-13T21:15:11Z
Indexed on
2010/06/13
21:22 UTC
Read the original article
Hit count: 131
I'm facing a problem that's really strange. It's in every browser.
Everything is working correctly, until you try to go to a section using the hash ( like #contactUs in my page)... try this url : http://mahersalam.co.cc/projects/2011/#contactUs
You will see that the page SHIFTS 10px to the top. if you take the hash, it works again.
I have a wrapper on the page (#container) that has overflow:hidden, I did it to make sure no scroll bars appear if the resolution change. If you remove the overflow property it works too.
I guess the shifting happens through the place of the scroll bar, but because it's hidden it's place only stays.
So does anyone knows how to fix this problem ?
© Stack Overflow or respective owner