-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrid.html
490 lines (464 loc) · 18.6 KB
/
grid.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<title>Groundwork CSS ♥ Responsive Grid System</title>
<!-- Modernizr -->
<script src="./js/libs/modernizr-2.6.2.min.js"></script>
<!-- jQuery -->
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">window.jQuery || document.write('<script src="./js/libs/jquery-1.8.2.min.js"><\/script>')</script>
<!-- Groundwork CSS -->
<link type="text/css" rel="stylesheet" href="./css/groundwork.css">
<!-- Groundy theme files -->
<link type="text/css" rel="stylesheet" href="./css/groundy/groundy.css">
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="./css/groundwork-ie.css">
<![endif]-->
<!--[if lt IE 9]>
<script type="text/javascript" src="./js/libs/html5shiv.js"></script>
<script>
/* polyfill custom tags for code samples */
customTags = ['tag','content','function','string','class','val','comment','arg','prop'];
for (var i = 0; i < customTags.length; i++) {
document.createElement(customTags[i]);
}
</script>
<![endif]-->
<!--[if IE 7]>
<link type="text/css" rel="stylesheet" href="./css/font-awesome-ie7.min.css">
<![endif]-->
<script type="text/javascript">
// (function(){
// var datauri = new Image();
// datauri.onerror = function() {
// Modernizr.addTest('datauri', function () { return false; });
// };
// datauri.onload = function() {
// Modernizr.addTest('datauri', function () { return (datauri.width == 1 && datauri.height == 1); });
// Modernizr.load({
// test: Modernizr.datauri,
// nope: './css/no-datauri.css'
// });
// };
// datauri.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
// })();
// fallback if SVG unsupported
Modernizr.load({
test: Modernizr.svg,
nope: './css/no-svg.css'
});
Modernizr.load({
test: Modernizr.svg,
nope: './css/groundy/no-svg.css'
});
// polyfill for HTML5 placeholders
Modernizr.load({
test: Modernizr.input.placeholder,
nope: [
'./css/placeholder_polyfill.css',
'./js/libs/placeholder_polyfill.jquery.js'
]
});
</script>
</head>
<body>
<header class="white band padded">
<div class="container">
<div class="row">
<div class="one half">
<h1 class="big responsive heading" data-compression="6.95" data-min="20" data-max="120" style="font-size:86px;"><a href="./home"><span class="logo"></span> Groundwork<sup>Beta</sup></a></h1>
</div>
<div class="one half double pad-top">
<nav class="inline pull-right">
<ul>
<li><a href="./home">Home</a></li
><li class="menu"><a href="./components">Components</a>
<ul>
<li><a href="./grid">Grid</a></li>
<li><a href="./media-queries">Media Queries</a></li>
<li><a href="./typography">Typography</a></li>
<li><a href="./buttons">Buttons</a></li>
<li><a href="./forms">Forms</a></li>
<li><a href="./navigation">Navigation</a></li>
<li><a href="./tabs">Tabs</a></li>
<li><a href="./ui-elements">UI Elements</a></li>
<li><a href="./tables">Tables</a></li>
<li><a href="./icons">Icons</a></li>
<li><a href="./social-icons">Social Icons</a></li>
<li><a href="./responsiveText-js">ResponsiveText</a></li>
<li><a href="./modals-js">Modals</a></li>
<li><a href="./tooltips-js">Tooltips</a></li>
<li><a href="./orbit-js">Orbit</a></li>
<!-- <li><a href="./popovers-js">Popovers</a></li> -->
</ul>
</li
><li><a href="./templates">Templates</a></li
><!-- <li><a href="http://github.com/groundworkcss/groundwork" target="_blank"><i class="icon-github-alt"></i></a></li
><li><a href="http://twitter.com/groundworkcss" target="_blank"><i class="icon-twitter"></i></a></li
> --><li><a href="https://github.com/groundworkcss/groundwork/archive/master.zip"><i class="icon-download-alt"></i></a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<div class="one whole padded">
<ul class="breadcrumbs">
<li><a href="./home.html">Home</a></li>
<li><a href="./components.html">Components</a></li>
<li><a href="./grid.html">Grid System</a></li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="one third padded">
<h1><i class="icon-th"></i> The Grid</h1>
<p>Unlike most grid systems, Groundwork supports a varied number of columns per row, up to 12. Column widths are specifed by classes which indicate what percentage of the row they take up, for example <code class="inline">one half</code>, <code class="inline">three fourths</code>, or <code class="inline">two fifths</code>.</p>
<h6>Example usage:</h6>
<code>
<pre><<tag>div</tag> class="<span>row</span>"></pre>
<pre> <<tag>div</tag> class="<span>two thirds</span>"><content>1st</content></<tag>div</tag>></pre>
<pre> <<tag>div</tag> class="<span>one third</span>"><content>2nd</content></<tag>div</tag>></pre>
<pre></<tag>div</tag>></pre>
</code>
<hr/>
<h6>Result:</h6>
<div class="demo">
<div class="row">
<div class="two thirds">1st</div>
<div class="one third">2nd</div>
</div>
</div>
<h4 class="double gap-top">Responsive Adjustments</h4>
<p>By default, columns collapse into seperate rows when viewport width is below 768 pixels. To achieve column layouts on smaller screens, you can apply <code class="inline">small-tablet</code> or <code class="inline">mobile</code>.</p>
<h6>Example usage:</h6>
<code>
<pre><<tag>div</tag> class="<span>row</span>"></pre>
<pre> <<tag>div</tag> class="<span>one mobile half</span>"><content>1/2</content></<tag>div</tag>></pre>
<pre> <<tag>div</tag> class="<span>one mobile half</span>"><content>1/2</content></<tag>div</tag>></pre>
<pre></<tag>div</tag>></pre>
</code>
<hr/>
<h6>Result:</h6>
<div class="demo">
<div class="row">
<div class="one mobile half">1st</div>
<div class="one mobile half">2nd</div>
</div>
</div>
</div>
<div class="two thirds padded">
<!-- start demo grid -->
<div class="demo">
<h2>Halves</h2>
<div class="row">
<div class="one half">1/2</div>
<div class="one half">1/2</div>
</div>
<h2>Thirds</h2>
<div class="row">
<div class="one third">1/3</div>
<div class="one third">1/3</div>
<div class="one third">1/3</div>
</div>
<div class="row">
<div class="one third">1/3</div>
<div class="two thirds">2/3</div>
</div>
<h2>Fourths</h2>
<div class="row">
<div class="one fourth">1/4</div>
<div class="two fourths">2/4</div>
<div class="one fourth">1/4</div>
</div>
<div class="row">
<div class="one fourth">1/4</div>
<div class="three fourths">3/4</div>
</div>
<h2>Fifths</h2>
<div class="row">
<div class="one fifth">1/5</div>
<div class="three fifths">3/5</div>
<div class="one fifth">1/5</div>
</div>
<div class="row">
<div class="one fifth">1/5</div>
<div class="four fifths">4/5</div>
</div>
<h2>Sixths</h2>
<div class="row">
<div class="one sixth">1/6</div>
<div class="two sixths">2/6</div>
<div class="three sixths">3/6</div>
</div>
<div class="row">
<div class="one sixth">1/6</div>
<div class="five sixths">5/6</div>
</div>
<h2>Sevenths</h2>
<div class="row">
<div class="one seventh">1/7</div>
<div class="two sevenths">2/7</div>
<div class="four sevenths">4/7</div>
</div>
<div class="row">
<div class="one seventh">1/7</div>
<div class="six sevenths">6/7</div>
</div>
<h2>Eighths</h2>
<div class="row">
<div class="one eighth">1/8</div>
<div class="three eighths">3/8</div>
<div class="four eighths">4/8</div>
</div>
<div class="row">
<div class="one eighth">1/8</div>
<div class="seven eighths">7/8</div>
</div>
<h2>Ninths</h2>
<div class="row">
<div class="one ninth">1/9</div>
<div class="three ninth">3/9</div>
<div class="five ninths">5/9</div>
</div>
<div class="row">
<div class="one ninth">1/9</div>
<div class="eight ninths">8/9</div>
</div>
<h2>Tenths</h2>
<div class="row">
<div class="one tenth">1/10</div>
<div class="three tenths">3/10</div>
<div class="six tenths">6/10</div>
</div>
<div class="row">
<div class="one tenth">1/10</div>
<div class="nine tenths">9/10</div>
</div>
<h2>Elevenths</h2>
<div class="row">
<div class="one eleventh">1/11</div>
<div class="three elevenths">3/11</div>
<div class="seven elevenths">7/11</div>
</div>
<div class="row">
<div class="one eleventh">1/11</div>
<div class="ten elevenths">10/11</div>
</div>
<h2>Twelfths</h2>
<div class="row">
<div class="one twelfth">1/12</div>
<div class="three twelfths">3/12</div>
<div class="eight twelfths">8/12</div>
</div>
<div class="row">
<div class="one twelfth">1/12</div>
<div class="eleven twelfths">11/12</div>
</div>
</div>
<hr/>
<h2>Small Tablets Grid</h2>
<p>Columns don't collapse into seperate rows until viewport width falls below 480 pixels</p>
<div class="demo">
<div class="row">
<div class="one small-tablet third">1/3</div>
<div class="one small-tablet third">1/3</div>
<div class="one small-tablet third">1/3</div>
</div>
<div class="row">
<div class="one small-tablet fourth">1/4</div>
<div class="two small-tablet fourths">2/4</div>
<div class="one small-tablet fourth">1/4</div>
</div>
<div class="row">
<div class="one small-tablet fifth">1/5</div>
<div class="three small-tablet fifths">3/5</div>
<div class="one small-tablet fifth">1/5</div>
</div>
<div class="row">
<div class="three small-tablet fourths">3/4</div>
<div class="one small-tablet fourth">1/4</div>
</div>
<div class="row">
<div class="one small-tablet half">1/2</div>
<div class="one small-tablet half">1/2</div>
</div>
<div class="row">
<div class="one small-tablet seventh">1/7</div>
<div class="five small-tablet sevenths">5/7</div>
<div class="one small-tablet seventh">1/7</div>
</div>
<div class="row">
<div class="three small-tablet tenths">3/10</div>
<div class="five small-tablet tenths">5/10</div>
<div class="two small-tablet tenths">2/10</div>
</div>
</div>
<hr/>
<h2>Mobile Grid</h2>
<p>Columns maintain structure down through mobile viewport sizes</p>
<div id="mobilegriddemo" class="demo">
<div class="row">
<div class="four mobile twelfths">1/3</div>
<div class="four mobile twelfths">1/3</div>
<div class="four mobile twelfths">1/3</div>
</div>
<div class="row">
<div class="three mobile twelfths">1/4</div>
<div class="six mobile twelfths">1/2</div>
<div class="three mobile twelfths">1/4</div>
</div>
<div class="row">
<div class="three mobile twelfths">1/4</div>
<div class="three mobile twelfths">1/4</div>
<div class="three mobile twelfths">1/4</div>
<div class="three mobile twelfths">1/4</div>
</div>
<div class="row">
<div class="nine mobile twelfths">3/4</div>
<div class="three mobile twelfths">1/4</div>
</div>
<div class="row">
<div class="eight mobile twelfths">2/3</div>
<div class="four mobile twelfths">1/3</div>
</div>
<div class="row">
<div class="six mobile twelfths">1/2</div>
<div class="six mobile twelfths">1/2</div>
</div>
<div class="row">
<div class="four mobile twelfths">1/3</div>
<div class="eight mobile twelfths">2/3</div>
</div>
<div class="row">
<div class="three mobile twelfths">1/4</div>
<div class="nine mobile twelfths">3/4</div>
</div>
<div class="row">
<div class="one mobile fifth">1/5</div>
<div class="three mobile fifths">3/5</div>
<div class="one mobile fifth">1/5</div>
</div>
<div class="row">
<div class="one mobile seventh">1/7</div>
<div class="five mobile sevenths">5/7</div>
<div class="one mobile seventh">1/7</div>
</div>
</div>
<hr/>
<h2>Re-ordering</h2>
<div class="reordering demo">
<div class="row">
<div class="one fifth right-four">1/5 (first)</div>
<div class="four fifths left-one">4/5 (last)</div>
</div>
<div class="row">
<div class="two thirds right-one">2/3 (first)</div>
<div class="one third left-two">1/3 (last)</div>
</div>
<div class="row">
<div class="one fourth right-two">1/4 (first)</div>
<div class="one fourth left-one">1/4 (second)</div>
<div class="one fourth right-one">1/4 (third)</div>
<div class="one fourth left-two">1/4 (fourth)</div>
</div>
<div class="row">
<div class="three eighths right-five">3/8 (first)</div>
<div class="two eighths left-three">2/8 (second)</div>
<div class="three eighths left-three">3/8 (third)</div>
</div>
</div>
<hr/>
<h2>Centering</h2>
<div class="centering demo">
<div class="row">
<div class="one centered mobile seventh">1/7</div>
</div>
<div class="row">
<div class="one centered mobile fifth">1/5</div>
</div>
<div class="row">
<div class="one centered mobile third">1/3</div>
</div>
</div>
<hr/>
<h2>Offsetting</h2>
<div class="offsetting demo">
<div class="row">
<div class="eleven mobile twelfths skip-one">11</div>
</div>
<div class="row">
<div class="ten mobile twelfths skip-two">10</div>
</div>
<div class="row">
<div class="nine mobile twelfths skip-three">9</div>
</div>
<div class="row">
<div class="eight mobile twelfths skip-four">8</div>
</div>
<div class="row">
<div class="seven mobile twelfths skip-five">7</div>
</div>
<div class="row">
<div class="six mobile twelfths skip-six">6</div>
</div>
<div class="row">
<div class="one mobile twelfth">1</div>
<div class="five mobile twelfths skip-six">5</div>
</div>
<div class="row">
<div class="two mobile twelfths">2</div>
<div class="four mobile twelfths skip-six">4</div>
</div>
<div class="row">
<div class="three mobile twelfths">3</div>
<div class="three mobile twelfths skip-six">3</div>
</div>
<div class="row">
<div class="four mobile twelfths">4</div>
<div class="two mobile twelfths skip-six">2</div>
</div>
<div class="row">
<div class="five mobile twelfths">5</div>
<div class="one mobile twelfth skip-six">1</div>
</div>
<div class="row">
<div class="four mobile fifths skip-one">4/5</div>
</div>
<div class="row">
<div class="eight mobile elevenths skip-three">8/11</div>
</div>
<div class="row">
<div class="five mobile sevenths skip-two">5/7</div>
</div>
</div>
</div>
<!-- end demo grid -->
</div>
</div>
<!-- scripts -->
<script type="text/javascript" src="./js/plugins/jquery.orbit-1.4.0.js"></script>
<script type="text/javascript" src="./js/groundwork.js"></script>
<!-- google analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-17121602-5']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>