Solved

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

Posted on 2011-09-12
3
257 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
Comment Utility
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
Comment Utility
Perfect.  Now I just need to decided as you suggest whether it is worth the trouble.  Thanks!
0
 
LVL 30

Expert Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now