css : layout Question
I have a css layout where in I have a single page website
the problem is I 开发者_如何学编程did not want the scrollbar so i did overflow hidden and the it worked fine but when there is different screen resolution, so content in the bottom is cut off is there any way to work around this
I mean the website should not have a scrollbar when the things fit on the first page but then when there is not enough room for the content the scrollbar should appear
You can use overflow:auto;
instead.
My recommendation is to use fixed width and minimum height to your body (or main container)
that way the browser will add is own scrolls if needed. you can read about fixed width here http://webdesign.about.com/od/css/ht/htcsscenterfix.htm
You want overflow:auto;
not overflow:hidden;
.
overflow:auto;
will return a scrollbar when needed, and won't when it isn't.
精彩评论