Created
November 29, 2010 21:37
-
-
Save jbail/720670 to your computer and use it in GitHub Desktop.
Making scrollbars on HTML elements using CSS overflow properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Make the element scroll on both x and y axes - CSS2 | |
*/ | |
.scroll-both { | |
overflow:scroll; | |
} | |
/* | |
* Make the element scroll on x axis only - CSS3 | |
*/ | |
.scroll-x { | |
overflow-x:scroll; | |
overflow-y:hidden; | |
} | |
/* | |
* Make the element scroll on y axis only - CSS3 | |
*/ | |
.scroll-y { | |
overflow-y:scroll; | |
overflow-x:hidden; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment