views:

44

answers:

2

Good day,

I've been doing some modifications to this website and the owner wants to have a horizontal scroll bar appearing when the browser window is reduced to a size that is smaller than the 'container' of the website. Right now it doesnt appear. I think that my main CSS is responsible for this. This CSS has overflow-x:hidden; and overflow-y:auto; because it is needed for my "jquery sticky footer' to work properly.

How can I workaround this and let this have a scroll bar horizontally on the browser window when I reduce it ? It's costing me some braincells now.

This is my CSS , what I think is responsible for not letting me have the scrollbar. BTW when I put overflow-x: auto; the scrollbar appears no matter what window size i have.

body, html {
    margin: 0;
    padding: 0;
    text-align: center;
    overflow-x: hidden;
    overflow-y: auto;
+1  A: 

Do you have anything inside body or HTML with a fixed size big enough to always make the scroll bar appear when you put overflow-x: auto? Where is this page located? If I start poking around with firebug, it might be able to help you out if it's publicly accessible.

-Brian J. Stinar-

Brian Stinar
+1 for mentioning firebug, its the perfect tool for problems such as this
m.edmondson
I agree about firebug. I'm using it every day
UXdesigner
I could use your help, but I can't provide the page name because it's in a staging server inside of the company.
UXdesigner
If you can duplicate it, or a similar page exhibiting the same behavior with roughly the same content, someplace public we can look at it. Otherwise, I kind of thing the best you're going to get is "something inside is big". You could also post more of the CSS and HTML, but an actual link would probably be the best.
Brian Stinar
I agree, you'll get some very good answers if you do this
m.edmondson
Iv'e done a lot of changes and now the horizontal scrollbar appears, when I reduce the window size, but just after the footer, not IN the browser. How come ?
UXdesigner
Problem was a "Live Support" chat application that was mountain an image on the website with a visibility:hidden property. Used FireBug (OutLine Blocks) to find the spot that was pushing this thing that way. Thank you all for your help.
UXdesigner
I believe this is default for having the overflow-x: specified in the body or html. Try specifying it to be auto on your element, and none on body and html.
Brian Stinar
A: 
overflow-x: hidden;

Its therefore hidden no matter what.

You say when you put auto it shows the scrollbar no matter what. This is likely because the 'container' is wider than the screen space available.

Maybe shrink your container to a smaller size will remove this, and only provide when the window is too thin. Be aware of other objects on the page which will widen the container.

m.edmondson
The container is 960px , and the screen is 1280px.
UXdesigner
How does it look in firebug? Is it off the screen?
m.edmondson
Looks beautiful in Firefox, and I don't see any big elements widening the container. I'll keep checking with firebug and see what I can find.
UXdesigner
Don't forget to also try developer tools in IE and the equivalent in Chrome
m.edmondson