Skip to content

Instantly share code, notes, and snippets.

Created July 4, 2015 22:39
Show Gist options
  • Save anonymous/91569174abd28c134658 to your computer and use it in GitHub Desktop.
Save anonymous/91569174abd28c134658 to your computer and use it in GitHub Desktop.
A simple mobile page with header, main content, and a footer A simple mobile page with header, main content, and a footer // source http://jsbin.com/yuzuwi
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="A simple mobile page with header, main content, and a footer">
<meta charset="utf-8">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="format-detection" content="telephone=no" />
<title>A simple mobile page with header, main content, and a footer</title>
<style id="jsbin-css">
* {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
tap-highlight-color: rgba(0, 0, 0, 0);
box-sizing: border-box;
}
body {
-webkit-touch-callout: none;
touch-callout: none;
outline: none;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
-webkit-user-select: none;
user-select: none;
background-color: @white;
font-family: "Helvetica", sans-serif;
font-size: 100%;
margin: 0;
padding: 0;
}
.app {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.app .navbar {
position: absolute;
left: 0;
right: 0;
top: 0;
height: 55px;
background-color: #99f;
color: #fff;
}
.app .navbar h1 {
position: absolute;
left: 55px;
right: 55px;
top: 0;
font-size: 130%;
padding: 0;
margin: 0;
line-height: 55px;
text-align: center;
padding: 0 8px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.app .main {
position: absolute;
left: 0;
right: 0;
top: 55px;
bottom: 55px;
overflow: auto;
-webkit-overflow-scrolling: touch;
padding: 10px;
}
.app .main h2 {
font-size: 110%;
padding: 0;
margin: 10px 0;
}
.app .main p {
padding: 0;
margin: 10px 0;
}
.app .tabbar {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 55px;
background-color: #222;
margin: 0;
padding: 0;
color: #fff;
}
.app .tabbar .button {
display: inline-block;
width: 25%;
margin: 0;
padding: 0;
height: 55px;
line-height: 55px;
text-align: center;
}
.app .tabbar .button {
text-decoration: none;
color: inherit;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>
</head>
<body>
<div class="app">
<header class="navbar">
<h1 class="title">Title of the page</h1>
</header>
<div class="main">
<h2>Main heading</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<footer class="tabbar">
<a href="#" class="button button1">tab 1
</a><a href="#" class="button button2">tab 2
</a><a href="#" class="button button3">tab 3
</a><a href="#" class="button button3">tab 4
</a>
</footer>
</div>
<script id="jsbin-source-css" type="text/css">* {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
tap-highlight-color: rgba(0, 0, 0, 0);
box-sizing: border-box;
}
body {
-webkit-touch-callout: none;
touch-callout: none;
outline: none;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
-webkit-user-select: none;
user-select: none;
background-color: @white;
font-family: "Helvetica", sans-serif;
font-size: 100%;
margin: 0;
padding: 0;
}
.app {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.app .navbar {
position: absolute;
left: 0;
right: 0;
top: 0;
height: 55px;
background-color: #99f;
color: #fff;
}
.app .navbar h1 {
position: absolute;
left: 55px;
right: 55px;
top: 0;
font-size: 130%;
padding: 0;
margin: 0;
line-height: 55px;
text-align: center;
padding: 0 8px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.app .main {
position: absolute;
left: 0;
right: 0;
top: 55px;
bottom: 55px;
overflow: auto;
-webkit-overflow-scrolling: touch;
padding: 10px;
}
.app .main h2 {
font-size: 110%;
padding: 0;
margin: 10px 0;
}
.app .main p {
padding: 0;
margin: 10px 0;
}
.app .tabbar {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 55px;
background-color: #222;
margin: 0;
padding: 0;
color: #fff;
}
.app .tabbar .button {
display: inline-block;
width: 25%;
margin: 0;
padding: 0;
height: 55px;
line-height: 55px;
text-align: center;
}
.app .tabbar .button {
text-decoration: none;
color: inherit;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</script>
</body>
</html>
* {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
tap-highlight-color: rgba(0, 0, 0, 0);
box-sizing: border-box;
}
body {
-webkit-touch-callout: none;
touch-callout: none;
outline: none;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
-webkit-user-select: none;
user-select: none;
background-color: @white;
font-family: "Helvetica", sans-serif;
font-size: 100%;
margin: 0;
padding: 0;
}
.app {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.app .navbar {
position: absolute;
left: 0;
right: 0;
top: 0;
height: 55px;
background-color: #99f;
color: #fff;
}
.app .navbar h1 {
position: absolute;
left: 55px;
right: 55px;
top: 0;
font-size: 130%;
padding: 0;
margin: 0;
line-height: 55px;
text-align: center;
padding: 0 8px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.app .main {
position: absolute;
left: 0;
right: 0;
top: 55px;
bottom: 55px;
overflow: auto;
-webkit-overflow-scrolling: touch;
padding: 10px;
}
.app .main h2 {
font-size: 110%;
padding: 0;
margin: 10px 0;
}
.app .main p {
padding: 0;
margin: 10px 0;
}
.app .tabbar {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 55px;
background-color: #222;
margin: 0;
padding: 0;
color: #fff;
}
.app .tabbar .button {
display: inline-block;
width: 25%;
margin: 0;
padding: 0;
height: 55px;
line-height: 55px;
text-align: center;
}
.app .tabbar .button {
text-decoration: none;
color: inherit;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment