【Sample】Layout Responsive 2column in HTML5

Demo

 Enter to Demo


HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>【Sample】Layout Responsive 2column in HTML5 - WEB DESIGN LAB</title>
<meta name="description" content="Layout Responsive 2column in HTML5.">
<meta name="keywords" content="HTML5,Responsive,2column,Layout,Sample,HTML,CSS">
<!--Require Mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=10.0, user-scalable=yes">
<!--Require Stylesheet-->
<link rel="stylesheet" href="sample.css">
<!--Require JavaScript-->
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
<script src="sample.js"></script>
</head>
<body>
<div id="wrapper">
<header>
<h2><a href="/en/">WEB DESIGN LAB</a></h2>
</header>
<div id="contents">
<nav>
<ul>
<li>nav</li>
</ul>
</nav>
<div id="main">
<article>
<section>
<h3>Layout Responsive 2column in HTML5</h3>
<p>
It is the template sample of the super simple responsive 2 column layout which I laid out in HTML5. In the mobile site, in the PC site, a break point is set in more than 769px to 768px. Because it is a simple design, please utilize the coding by all means easily.m(_ _)m</p>
</section>
</article>
<!--main--></div>
<aside>
<p>aside</p>
</aside>
<!--contents--></div>
<footer>
<div id="copyright">&copy;WEB DESIGN LAB<!--copyright--></div>
</footer>
<!--wrapper--></div>
</body>
</html>
CSS

* {
	margin: 0;
	padding: 0;
}
html {
	overflow-y: scroll;
}
html,body {
	height: 100%;
}
img {
	border: none;
}
ul,ol {
	list-style: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}
body {
	font-size: 100%;
	line-height: 1.6;
	font-family: "Hiragino Kaku Gothic Pro",Meiryo,"MS PGothic",sans-serif;
}
h1,h2,h3,h4,h5,h6 {
	font-size: 100%;
}
a,a:link,a:visited {
	color: #4776AF;
	text-decoration: none;
}
a:hover,a:active {
	color: #9fb7d4;
}
article,aside,details,footer,header,main,menu,nav,section,summary {
	display: block;
}
/*------------------------------------------------------------------*/
/* 0 to 768px */
body {
	-webkit-text-size-adjust: 100%;
}
header {
	overflow: hidden;
	border-bottom: 2px solid #9fb7d4;
}
	header h2 {
		margin: 0 auto;
		padding: 10px;
	}
#contents nav {
	overflow: hidden;
	background: #ddd;
}
	#contents nav ul {
		padding: 10px;
		list-style: none;
		overflow: hidden;
	}
	#contents nav ul li {
		float: left;
		margin-right: 10px;
	}
#contents #main {
	overflow: hidden;
	background: #d49fc2;
}
	#contents #main article {
		overflow: hidden;
		padding: 10px;
	}
#contents aside {
	overflow: hidden;
	background: #ccc;
}
	#contents aside p {
		padding: 10px;
	}
footer {
	overflow: hidden;
	border-top: 2px solid #9fb7d4;
}
/* ** */
@media only screen and (min-width: 769px) {
header {
	min-width: 1060px;
	overflow: hidden;
	border-bottom: 2px solid #9fb7d4;
}
#contents {
	overflow: hidden;
	width: 1060px;
	margin: 0 auto;
}
#contents nav {
	width: 1060px;
	margin: 0 auto;
	overflow: hidden;
	background: #ddd;
}
	#contents nav ul {
		padding: 10px;
		list-style: none;
		overflow: hidden;
	}
	#contents nav ul li {
		float: left;
		margin-right: 10px;
	}
#contents #main {
	float: left;
	width: 760px;
	overflow: hidden;
	background: #9fb7d4;
}
	#contents #main article {
		overflow: hidden;
		padding: 10px;
	}
#contents aside {
	float: left;
	width: 300px;
	overflow: hidden;
	background: #ccc;
}
	#contents aside p {
		padding: 10px;
	}
footer {
	min-width: 1060px;
	overflow: hidden;
	border-top: 2px solid #9fb7d4;
}
/* ** */}
Back to the previous page