Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-09-12
3
Medium Priority
?
266 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
LZ1 earned 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

705 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