<head>
<script type="application/javascript" src="/script/iscroll-lite.js"></script>
<script type="text/javascript">
var myScroll;
function loaded() {
setTimeout(function () {
myScroll = new iScroll('container');
}, 100);
}
window.addEventListener('load', loaded, false);
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="mainContainer">
<div class="fixed-header">
<ul>
//fixed content </ul>
</div>
<div id="container">
<div id="scroller">
//scrollable content (page) consists of several divs and ul's
</div>
</div>
</div>
</body>
My CSS:
*
{
margin:0px;
padding:0px;
}
html, body, form
{
margin:0px;
padding:0px;
}
body
{
min-width:310px;
font-family:Helvetica, Arial Rounded MT Bold, Trebuchet MS;
height:100%;
}
.fixed-header
{
position:absolute; z-index:2;
top:0; left:0;
width:100%;
height:45px;
line-height:45px;
padding:0;
color:#eee;
font-size:20px;
text-align:center;
text-shadow: 0 -1px 0px rgba(0,0,0,0.3);
background-color:#222;
background-image:-webkit-gradient(linear, 0 0, 0 100%, color-stop(0, #999), color-stop(0.02, #444), color-stop(1, #222));
background-image:-moz-linear-gradient(top, #999, #444 2%, #222);
background-image:-o-linear-gradient(top, #999, #444 2%, #222);
}
.mainContainer
{
width:100%;
min-height:100%;
position:relative;
}
#container
{
width:100%;
overflow:auto;
position:absolute; z-index:1;
}
#scroller
{
padding:55px 10px 10px 10px;
}
Thanks for checking it out!
Cyril