www.webdeveloper.com
Results 1 to 4 of 4

Thread: Div align = center annoyance

  1. #1
    Join Date
    Apr 2006
    Posts
    493

    Div align = center annoyance

    I have noticed many-a time when aligning a page to center, that once the page content leads to the page being able to scroll that the center is not the same location as pages do not, creating a slight jumping affect when going though the navigation.

    is there an easy way to remedy this problem?

  2. #2
    Join Date
    Apr 2009
    Posts
    7
    If I understand you correctly, it's because the scroll bar appears on the right and reduces the window's available width slightly. Not sure how you'd get around it in any simple way though, unless you write a different css rule for pages without overflowing content...

  3. #3
    Join Date
    Apr 2009
    Location
    NFLD, Canada
    Posts
    42
    All you need to do is force the scroll bar to appear even when the content is too short to need it. It will appear greyed out.

    To do this use the following:

    Code:
    html {
     overflow-y: scroll;
    }

  4. #4
    Join Date
    Apr 2006
    Posts
    493
    Quote Originally Posted by biglac
    If I understand you correctly, it's because the scroll bar appears on the right and reduces the window's available width slightly. Not sure how you'd get around it in any simple way though, unless you write a different css rule for pages without overflowing content...
    that would be correct

    Quote Originally Posted by lystar View Post
    All you need to do is force the scroll bar to appear even when the content is too short to need it. It will appear greyed out.

    To do this use the following:

    Code:
    html {
     overflow-y: scroll;
    }
    sweet, just what i was looking for. many thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles