开发者

What is causing this shift in layout? CSS? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 4 years ago.

Improve this question

I have been following the RoR tutorial and noticed that my layout appears to shift while moving between nav links. Rather than link to my actual project, you can see what I am talki开发者_如何学编程ng about by looking at the author's personal homepage: www.michaelhartl.com/ If you move between the nav links at the top, the whole page appears to shift. I am guessing that this has nothing to do with RoR, and more with CSS.


Some pages have scrollbars, some others don't. When the scrollbar appears it shift it left some pixels. (If this is what you mean.)


As Sotiris said, some pages have scrollbars and some don't, due to the amount of content on the page. You can force scrollbars to appear on every page and prevent this apparent 'shift' by putting the following in your CSS file:

html { overflow-y: scroll; }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜