HTML - Responsive

In this topic we discus on responsive web design using some css code the following example describe responsive web design in html5.

Example


<html>
<head>
<title>Responsive Web Design>/title>
<style>
.section {
	clear: both;
	padding: 0px;
	margin: 0px;
}

.col {
	display: block;
	float:left;
	margin: 1% 0 1% 1.6%;
}
.col:first-child {margin-left: 0; }

.group:before,
.group:after {
	content:"";
	display:table;
}
.group:after {
	clear:both;
}
.group {
}

.span_3_of_3 {
	width: 100%;
}
.span_2_of_3 {
	width: 66.1%;
}
.span_1_of_3 {
	width: 32.2%;
}


@media only screen and (max-width: 480px) {
	.col { margin: 1% 0 1% 0%;}
	.span_3_of_3, .span_2_of_3, .span_1_of_3 { width: 100%; }
}
</style>
</head>
<body>
<div class="section group">
	<div class="col span_1_of_3">
	This is column 1
	</div>
	<div class="col span_1_of_3">
	This is column 2
	</div>
	<div class="col span_1_of_3">
	This is column 3
	</div>
</div>
</body>
</html>
							
Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit

You may also like this!