Solved

Web pages move if windows has to add a scroll bar on long pages.  Workaround ?

Posted on 2011-09-12
3
259 Views
Last Modified: 2012-05-12
I am working on a website for a friend, and I have basic knowledge of css & html.  I want all of the pages to be anchored in the exact same spot (left to right, and distance from the top).  They are all based on the same Dreamweaver template.  The problem that I have (which I admit is pretty nitpicky) is that when any of the pages are too long to fit vertically on the screen, Windows adds scrollbars on the right side of the screen display so that the user can scroll down to see the entire webpage.  That shifts the longer pages to left by a width 1/2 of the scrollbars because my left and right margins are set to auto, and the Windows scrollbars decrease the available screen width.

I like having the padding set to auto so that it is easy to center the page for any screen resolution, but maybe there is a way to get the screen resolution, then calculate what a fixed left margin would be so that the pages would appear to be always in the middle and not move even if the scrollbars appeared on the long pages and reduced the screen width by a bit....  Or maybe there is another way.

Is there something cool and easy that I could do to get around this, or is it more trouble than it is worth ?

Thanks !
0
Comment
Question by:Kevin
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
LZ1 earned 500 total points
ID: 36522714
Have you taken a look at this?
http://haslayout.net/css-tuts/Fixing-Page-Shift-Problem

IMHO I think it's more trouble than it's worth. IE is an inferior browser with more quirks than people know what to do with.  You may find that you NEED to fix this, so the fix above should be all you need.
0
 

Author Closing Comment

by:Kevin
ID: 36522987
Perfect.  Now I just need to decided as you suggest whether it is worth the trouble.  Thanks!
0
 
LVL 30

Expert Comment

by:LZ1
ID: 36523037
That's the hardest part now. ;)  Good luck!
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question