浏览器滚动条 [英] Browser scrollbar
问题描述
我有一个perfectely居中对齐的网站。 CSS的code正常工作。这个问题并没有真正与CSS做。我的每一页页眉的perfectely匹配海誓山盟。
I have a website that is perfectely centered aligned. The CSS code works fine. The problem doesn't really have to do with CSS. I have headers for each page that perfectely match eachother.
然而,当含量越大,Opera和Firefox显示在左侧滚动条,所以你可以滚动的内容没有在屏幕上。这使我的网站跳了几个像素到左边。因此,标头不perfectely了一致。
However, when the content gets larger, Opera and FireFox show a scrollbar at the left so you can scroll to the content not on the screen. This makes my site jump a few pixels to the left. Thus the headers are not perfectely aligned anymore.
IE浏览器总是有一个滚动条,所以该网站从未跳跃IE左右。
IE always has a scrollbar, so the site never jumps around in IE.
有谁知道这个问题的一个JavaScript / CSS / HTML解决方案?
Does anyone know a JavaScript/CSS/HTML solution for this problem?
推荐答案
我用
html { overflow-y: scroll; }
要在IE和FF规范行为滚动条
To standardize the scrollbar behavior in IE and FF
这篇关于浏览器滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!