Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Probably a very simple CSS question

Options
  • 05-05-2009 5:54pm
    #1
    Registered Users Posts: 9,383 ✭✭✭


    I'm currently working on a basic centre aligned site and have a small issue.

    What's the best way to stop the slight shift in my layout that occurs when viewers navigate from a short page with no scroll bar to a long page where the scroll bar leads to a slight change in the browser window size?

    Any help would be great,


Comments

  • Closed Accounts Posts: 1,200 ✭✭✭louie


    unfortunately none.... or get a bigger screen with the "right" height.


  • Registered Users Posts: 8,070 ✭✭✭Placebo


    why dont you use something like iframes or a div for longer pages so scroll bar appears inside the main content box


  • Registered Users Posts: 2,119 ✭✭✭p


    This is just in Firefox, right. The easiest way is to force scroll bars by making the site automatically too high. Something like this will do the trick:
    body {
    min-height: 101%;
    }


  • Registered Users Posts: 9,383 ✭✭✭S.M.B.


    It's obviously not that simple then, i suppose it now makes sense why i haven't come across a solution for the problem before.

    Thanks for the suggestions anyway.


  • Registered Users Posts: 2,119 ✭✭✭p


    eh... did you try my suggestion?


  • Advertisement
  • Moderators, Society & Culture Moderators Posts: 25,558 Mod ✭✭✭✭Dades


    If you add style this to your body tag, it adds a default scrollbar like in IE to FireFox.
    [HTML]overflow-y: scroll;[/HTML]

    You may need to find a way to hide that style from IE, however, as it might screw it up.

    G'luck!


  • Registered Users Posts: 9,383 ✭✭✭S.M.B.


    p wrote: »
    eh... did you try my suggestion?
    Sorry about that, when I read your reply I picked it up as being a solution for firefox only and I'd have to look for some other solution for IE.

    I completely forgot that IE uses a default scroll bar. Shows you how much I try avoid using the browser.

    Thanks for the help.


Advertisement