After getting the right answer from this question, I am having another problem – adding margin:0em auto; to my page will cause the page ‘jumpy’
.align-center-public {
width:1000px;
margin:0em auto;
overflow:hidden;
}
<div id="container">
<div class="align-center-public">
<p style="width:800px; text-align:center; border:1px solid #000;"><a href="#">Please scroll down until you see the click button</a></p>
<p><img src="winnie-the-pooh-2011-9.jpg" alt="test"/></p>
<p><img src="winnie-the-pooh-2011-9.jpg" alt="test"/></p>
<p><img src="winnie-the-pooh-2011-9.jpg" alt="test"/></p>
<div><a href="#" class="get-photo">click here</a></div>
<p><img src="winnie-the-pooh-2011-9.jpg" alt="test"/></p>
</div>
</div>
How can I fix this?
Here is the link again.
EDIT
And:
And now I’m noticing that this apparently is all you need.
http://jfcoder.com/test/pooh.html
To keep the page from correcting when the scrollbars disappear, you need to pad the
BODYappropriately. This is more than likely a different value for each browser. The above I have tested in FF6, IE8/9 and Chrome latest only.