Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a web page with a bit of a problem on it.

When there is more content on the page, the height expands, wich is fine, but as the height expands, every browser shows a scrollbar at the most right part. The problem is, when that scrollbar is visible, my page content moves about 10 px to the left (10px beeing the width of the scrollbar).

Does anybody know how to fix this so that my content stays on the middle and ignore the scrollbar?

Thanks in advance for your time!

Andrej

share|improve this question
As per the FAQ this question belongs on Doctype – John Conde Dec 14 '10 at 12:55

closed as off topic by John Conde Dec 14 '10 at 12:55

Questions on Webmasters Stack Exchange are expected to relate to webmastering within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

You can stop the scrollbar by using the "overflow: hidden" attribute to the Div that the scrollbar appears in. There are other ways and means, but it's hard to say when can't see the web page or code.

share|improve this answer