Created
May 9, 2014 12:51
-
-
Save maxhoffmann/fcc2a72a85b56955fbbc to your computer and use it in GitHub Desktop.
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
.scrollable { | |
overflow: auto; | |
} | |
.scrollableWrapper { | |
position: relative; | |
} | |
.scrollableWrapper:before { | |
content: ''; | |
position: absolute; | |
top: 0; | |
left: 0; | |
right: 0; | |
background: red; | |
height: 50px; | |
} | |
.scrollableWrapper:after { | |
content: ''; | |
position: absolute; | |
bottom: 0; | |
left: 0; | |
right: 0; | |
background: red; | |
height: 50px; | |
} | |
.element { | |
height: 200px; | |
} | |
.container ul { | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
} | |
.container li { | |
height: 50px; | |
background: 10px; | |
border-bottom: 1px solid gray; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="scrollableWrapper"> | |
<div class="element scrollable"> | |
<div class="container"> | |
<ul> | |
<li>1</li> | |
<li>2</li> | |
<li>3</li> | |
<li>4</li> | |
<li>5</li> | |
<li>6</li> | |
<li>7</li> | |
<li>8</li> | |
<li>9</li> | |
<li>10</li> | |
</ul> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment