Created
February 5, 2014 14:35
-
-
Save adityab/8824899 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
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, target-densityDpi=device-dpi, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
<script> | |
</script> | |
<style> | |
#toolbar { | |
text-align: center; | |
overflow: hidden; | |
top: 0; | |
left: 0; | |
right: 0; | |
position: fixed; | |
z-index: 5; | |
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25); | |
height: 100px; | |
background: green; | |
} | |
#inputs { | |
text-align: center; | |
background-color: #ddd; | |
overflow: auto; | |
-webkit-overflow-scrolling: touch; | |
position: absolute; | |
top: 100px; | |
bottom: 0; | |
left: 0; | |
right: 0; | |
} | |
input { | |
display: block; | |
margin: 50px; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
h1 { | |
font-size: 50px; | |
margin: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="mainContainer"> | |
<div id="toolbar"> | |
<h1>Toolbar</h1> | |
<p>This toolbar should not move when an input below gets focus.</p> | |
</div> | |
<div id="inputs"> | |
<p> Inputs: </p> | |
<input type="text"/> | |
<input type="text"/> | |
<input type="text"/> | |
<input type="text"/> | |
<input type="text"/> | |
<input type="text"/> | |
<input type="text"/> | |
<input type="text"/> | |
<input type="text"/> | |
<input type="text"/> | |
<input type="text"/> | |
<input type="text"/> | |
<input type="text"/> | |
<input type="text"/> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment