Created
November 11, 2014 08:39
-
-
Save shuhei/12d75e098811da6eb9b0 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
div { | |
position: absolute; | |
width: 200px; | |
} | |
#wrapper { | |
background-color: #f00; | |
top: 0; | |
bottom: 0; | |
} | |
#header { | |
background-color: #f0f; | |
top: 0; | |
height: 100px; | |
} | |
#content { | |
background-color: #00f; | |
top: 100px; | |
bottom: 150px; | |
overflow-y: scroll; | |
} | |
#something { | |
background-color: #0ff; | |
position: static; | |
height: 2000px; | |
} | |
#footer { | |
background-color: #0f0; | |
bottom: 0; | |
height: 150px; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="wrapper"> | |
<div id="header"></div> | |
<div id="content"> | |
<div id="something"> | |
1<br>2<br>3 | |
</div> | |
</div> | |
<div id="footer"></div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment