This repository has been archived by the owner on Mar 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathresponsive_column_layouts.html
149 lines (133 loc) · 4.09 KB
/
responsive_column_layouts.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Layout a colonne responsive :: webdesignerwall.com/</title>
<link href='http://fonts.googleapis.com/css?family=Maven+Pro:400,700' rel='stylesheet' type='text/css' />
<link href="common/css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
*{margin:0;padding:0}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display: block;}
#pagewrap {width: 978px;max-width: 96%;margin: 0 auto;}
.wrapper {overflow: hidden;}
h3{margin-bottom:10px;}
.col{background: #eee;float: left;margin-left: 3.2%;margin-bottom: 30px;}
.fullwidth .col {float: none;margin-left: 0;}
/* grid4 col */
.grid4 .col {width: 22.6%;}
/* grid3 col */
.grid3 .col {width: 31.2%;}
/* grid2 col */
.grid2 .col {width: 48.4%;}
/* clear col */
.grid4 .col:nth-of-type(4n+1),
.grid3 .col:nth-of-type(3n+1),
.grid2 .col:nth-of-type(2n+1) {
margin-left: 0;
clear: left;
}
/* reset cols to 3-column */
@media screen and (max-width: 740px) {
/* grid4 */
.grid4 .col {
width: 31.2%;
}
.grid4 .col:nth-of-type(4n+1) {
margin-left: 3.2%;
clear: none;
}
.grid4 .col:nth-of-type(3n+1) {
margin-left: 0;
clear: left;
}
}
/* reset cols to 2-column */
@media screen and (max-width: 600px) {
/* grid4 */
.grid4 .col {
width: 48.4%;
}
.grid4 .col:nth-of-type(3n+1) {
margin-left: 3.2%;
clear: none;
}
.grid4 .col:nth-of-type(2n+1) {
margin-left: 0;
clear: left;
}
/* grid3 */
.grid3 .col {
width: 48.4%;
}
.grid3 .col:nth-of-type(3n+1) {
margin-left: 3.2%;
clear: none;
}
.grid3 .col:nth-of-type(2n+1) {
margin-left: 0;
clear: left;
}
}
/* reset cols to fullwidth */
@media screen and (max-width: 400px) {
/* grid4 */
.col {
width: 100% !important;
margin-left: 0 !important;
clear: none !important;
}
}
</style>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://s3.amazonaws.com/nwapi/nwmatcher/nwmatcher-1.2.5-min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/selectivizr/1.0.2/selectivizr-min.js"></script>
<![endif]-->
</head>
<body>
<a id="logo" href="http://www.laboratoriocss.it" title="Laboratorio CSS" class="logo"><img src="common/img/structure/logoLabcss.png" alt="Logo laboratorio CSS" /></a>
<div id="container">
<div id="header">
<h1>Layout a colonne responsive</h1>
<p id="description">Di seguito la traduzione dell’articolo "Responsive Column Layouts" di Nick La. L'autore dell'articolo, http://webdesignerwall.com/tutorials/responsive-column-layouts, ci spiega come realizzare un layout a colonne che si adatti sempre bene con tutte le varie risoluzioni.</p>
</div>
<div id="content">
<!-- ESEMPIO -->
<div id="pagewrap">
<h3>Grid4</h3>
<div class="wrapper grid4">
<article class="col">Column 1</article>
<article class="col">Column 2</article>
<article class="col">Column 3</article>
<article class="col">Column 4</article>
<article class="col">Column 5</article>
<article class="col">Column 6</article>
<article class="col">Column 7</article>
<article class="col">Column 8</article>
</div>
<h3>Grid3</h3>
<div class="wrapper grid3">
<article class="col">Column 1</article>
<article class="col">Column 2</article>
<article class="col">Column 3</article>
<article class="col">Column 4</article>
<article class="col">Column 5</article>
<article class="col">Column 6</article>
</div>
<h3>Grid2</h3>
<div class="wrapper grid2">
<article class="col">Column 1</article>
<article class="col">Column 2</article>
<article class="col">Column 3</article>
<article class="col">Column 4</article>
</div>
<h3>Fullwidth</h3>
<div class="wrapper fullwidth">
<article class="col">Column 1</article>
</div>
</div>
<!-- //ESEMPIO -->
</div>
</div>
</body>
</html>