CSS pages not equal even with the same css-file

帅比萌擦擦* 提交于 2019-12-12 01:37:53

问题


This is the site i am using as a test site: http://test.pafo.net/

My problem is that the pages, even thou they are equal, they change in position. If you click on Seite 2 and then Start and keep clicking on them, you will see that the entire container is moving a little.

The only difference between those pages are that Seite 2 has more example text, nothing else.

Whats causing this? Did i forget an attribute in the stylesheet somewhere?


回答1:


Seite 2 gets a scrollbar. That alters the page dimensions. Because your content is centered, it appears to move to the left half the width of the vertical scrollbar.




回答2:


If you add overflow:scroll; to each page's stylesheet, (on the body element, for example) then a scrollbar will always be rendered even when it's not necessary.



来源:https://stackoverflow.com/questions/3408072/css-pages-not-equal-even-with-the-same-css-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!