by http://webgeektutorials.blogspot.com

Sunday, April 3, 2011

CSS Trick To Hide Horizontal Vertical Scrolling

Sometime as per need you want to hide horizontal-vertical bar in your pages. This can be achieved through cascading style sheet (css). It is possible to forcibly hide either the horizontal or the vertical scrollbars.

To show vertical scroll-bar and hide horizontal scroll-bar, add following lines in style-sheet :
overflow-x: hidden;
overflow: auto;

To show horizontal scroll-bar and hide vertical scroll-bar,
add following lines in style-sheet :
overflow-y: hidden;
overflow: auto; 


If you want to accomplish the same in Gecko (NS6+, Mozilla, etc) and IE4+ simultaneously, I believe code below should work:


body {
overflow: -moz-scrollbars-vertical;
overflow-x: hidden;
overflow-y: scroll;
}

Now its your turn....  please check and comment..

Sharing is caring :)

No comments:

Post a Comment