Skip to content

Instantly share code, notes, and snippets.

@cstrelioff
Created April 2, 2015 18:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save cstrelioff/a4ed0e527cc7610342ce to your computer and use it in GitHub Desktop.
Save cstrelioff/a4ed0e527cc7610342ce to your computer and use it in GitHub Desktop.
a basic responsive page
<!DOCTYPE html>
<html>
<head>
<title>basic responsive page</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- styles: should have reset.css first -->
<link rel="stylesheet" href= "reset.css">
<link rel="stylesheet" href= "main.css">
</head>
<body>
<div id="fullpage">
<header role="banner" id="header">
<h1>header</h1>
</header>
<article id="article_1">
<h1>article</h1>
</article>
<aside role="complementary" id="aside_1">
<h1>aside</h1>
</aside>
<footer role="contentinfo" id="footer">
<h1>footer</h1>
</footer>
</div> <!-- end fullpage -->
<!-- javascript links -->
</body>
</html>
/* Main Content ----------------------------- */
header, article, aside, footer, ul, li, p {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#fullpage {
max-width: 62em;
margin: auto;
}
header, article, aside, footer {
padding: 10px 1em;
margin: 0 5% 10px;
border:1px solid #111;
background-color: lightgrey;
}
header {
margin-top: 10px;
}
article {
min-height: 10em;
}
aside {
min-height: 5em;
}
h1 {
font-size: 2em;
}
h2 {
font-size: 1.5em;
}
h1, h2 {
font-weight: bold;
margin: 5px 0;
}
p {
font-size: 1em;
margin: 5px 0;
}
ul {
padding-left: 10px;
margin: 10px 0;
list-style-type: none;
}
li {
margin-left: 10px;
padding-left: 10px;
}
strong {
font-weight: bold;
}
/* Media ---------------------------------------*/
@media only screen and (min-width: 38em) {
article {
width: 67%;
float: left;
margin-right: 0;
}
aside {
width: 21%;
float: right;
margin-left: 0;
}
footer {
clear: both;
}
}
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment