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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Probably a very simple CSS question

  • 05-05-2009 4:54pm
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 2,120 ✭✭✭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, Registered Users 2 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, Registered Users 2 Posts: 2,120 ✭✭✭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, Registered Users 2 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