forked from olton/Metro-UI-CSS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grid.html
827 lines (763 loc) · 44.2 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
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="twitter:site" content="@metroui">
<meta name="twitter:creator" content="@pimenov_sergey">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Metro 4 Components Library">
<meta name="twitter:description" content="Metro 4 is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with responsive grid system, extensive prebuilt components, and powerful plugins built on jQuery.">
<meta name="twitter:image" content="https://metroui.org.ua/images/m4-logo-social.png">
<meta property="og:url" content="https://metroui.org.ua/v4/index.html">
<meta property="og:title" content="Metro 4 Components Library">
<meta property="og:description" content="Metro 4 is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with responsive grid system, extensive prebuilt components, and powerful plugins built on jQuery.">
<meta property="og:type" content="website">
<meta property="og:image" content="https://metroui.org.ua/images/m4-logo-social.png">
<meta property="og:image:secure_url" content="https://metroui.org.ua/images/m4-logo-social.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="968">
<meta property="og:image:height" content="504">
<meta name="author" content="Sergey Pimenov">
<meta name="description" content="Use our powerful mobile-first flexbox grid to build layouts of all shapes and sizes thanks to a twelve column system, five default responsive tiers, Less variables and mixins, and dozens of predefined classes.">
<meta name="keywords" content="HTML, CSS, JS, Metro, CSS3, Javascript, HTML5, UI, Library, Web, Development, Framework">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link href="metro/css/metro-all.css" rel="stylesheet">
<link href="highlight/styles/github.css" rel="stylesheet">
<link href="docsearch/docsearch.min.css" rel="stylesheet">
<link href="css/site.css" rel="stylesheet">
<title>Grid system - Metro 4 :: Popular HTML, CSS and JS library</title>
</head>
<body>
<div class="container-fluid">
<div class="row flex-xl-nowrap">
<div class="cell-md-3 cell-xl-2 pr-0 border-right bd-light" id="sidenav">
</div>
<div class="d-none d-block-xl cell-xl-2 order-2 border-left bd-light toc-wrapper">
<h5>Table of contents</h5>
<hr/>
<ul class="toc-nav">
<li class="toc-entry"><a href="#">Grid system</a></li>
<li class="toc-entry"><a href="#_grid_about">About</a></li>
<li class="toc-entry"><a href="#_how_it_works">How it works</a></li>
<li class="toc-entry"><a href="#_colspan">Colspan</a></li>
<li class="toc-entry"><a href="#_offset">Offset</a></li>
<li class="toc-entry"><a href="#_media_columns">Media columns</a></li>
<li class="toc-entry"><a href="#_gaps">Gaps</a></li>
<li class="toc-entry"><a href="#_stub_column">Stub column</a></li>
<li class="toc-entry"><a href="#_ordering">Ordering</a></li>
<li class="toc-entry"><a href="#_nested_rows">Nested rows</a></li>
<li class="toc-entry"><a href="#_alignment">Alignment columns</a></li>
<li>
<ul>
<li class="toc-entry"><a href="#_alignment_columns_v">Vertical</a></li>
<li class="toc-entry"><a href="#_alignment_columns_h">Horizontal</a></li>
</ul>
</li>
</ul>
</div>
<main class="cell-md-9 cell-xl-8 order-1 pr-1-sx pl-1-sx pr-5-md pl-5-md">
<div class="place-right d-none d-block-lg" style="width: 200px;">
<img src="images/logo.png" class="w-100">
</div>
<h1 id="_grid_system">Grid system</h1>
<p class="text-leader">
Use our powerful mobile-first flexbox grid to build layouts of all shapes and sizes thanks to a twelve column system, five default responsive tiers, Less variables and mixins, and dozens of predefined classes.
</p>
<!-- ads-html -->
<h3 id="_grid_about">About</h3>
<p>
Metro 4 grid system uses a series of containers, rows, and columns to layout and align content.
</p>
<div class="container-fluid p-5 border border-4 bd-grayWhite mt-3 mb-3 d-none d-block-md">
<div class="grid demo-grid">
<div class="row">
<div class="cell"><div>1</div></div>
<div class="cell"><div>2</div></div>
<div class="cell"><div>3</div></div>
<div class="cell"><div>4</div></div>
<div class="cell"><div>5</div></div>
<div class="cell"><div>6</div></div>
<div class="cell"><div>7</div></div>
<div class="cell"><div>8</div></div>
<div class="cell"><div>9</div></div>
<div class="cell"><div>10</div></div>
<div class="cell"><div>11</div></div>
<div class="cell"><div>12</div></div>
</div>
<div class="row">
<div class="cell-3"><div>cell-3</div></div>
<div class="cell-3"><div>cell-3</div></div>
<div class="cell-3"><div>cell-3</div></div>
<div class="cell-3"><div>cell-3</div></div>
</div>
<div class="row">
<div class="cell-4 offset-4"><div>cell-4 + offset-4</div></div>
</div>
<div class="row">
<div class="cell-3"><div>cell-3</div></div>
<div class="cell-6 offset-3"><div>cell-6 + offset-3</div></div>
</div>
<div class="row">
<div class="cell-4 offset-4"><div>cell-4 + offset-4</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
</div>
<div class="row">
<div class="cell">
<div class="row">
<div class="cell"><div>nested</div></div>
<div class="cell"><div>nested</div></div>
<div class="cell"><div>nested</div></div>
<div class="cell"><div>nested</div></div>
</div>
</div>
</div>
</div>
</div>
<pre><code class="html">
<div class="grid">
<div class="row">
<div class="cell"><div>1</div></div>
<div class="cell"><div>2</div></div>
<div class="cell"><div>3</div></div>
<div class="cell"><div>4</div></div>
<div class="cell"><div>5</div></div>
<div class="cell"><div>6</div></div>
<div class="cell"><div>7</div></div>
<div class="cell"><div>8</div></div>
<div class="cell"><div>9</div></div>
<div class="cell"><div>10</div></div>
<div class="cell"><div>11</div></div>
<div class="cell"><div>12</div></div>
</div>
<div class="row">
<div class="cell-3"><div>cell-3</div></div>
<div class="cell-3"><div>cell-3</div></div>
<div class="cell-3"><div>cell-3</div></div>
<div class="cell-3"><div>cell-3</div></div>
</div>
<div class="row">
<div class="cell-4 offset-4"><div>cell-4 + offset-4</div></div>
</div>
<div class="row">
<div class="cell-3"><div>cell-3</div></div>
<div class="cell-6 offset-3"><div>cell-6 + offset-3</div></div>
</div>
<div class="row">
<div class="cell-4 offset-4"><div>cell-4 + offset-4</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
</div>
<div class="row">
<div class="cell">
<div class="row">
<div class="cell"><div>nested</div></div>
<div class="cell"><div>nested</div></div>
<div class="cell"><div>nested</div></div>
<div class="cell"><div>nested</div></div>
</div>
</div>
</div>
</div>
</code></pre>
<h3 id="_how_it_works">How it works</h3>
<p>
Metro 4 grid system uses a series of containers, rows, and columns to layout and align content. It’s built with flexbox and is fully responsive. Below is an example and an in-depth look at how the grid comes together.
</p>
<div class="container-fluid p-5 border border-4 bd-grayWhite mt-3 mb-3 demo-grid">
<div class="row">
<div class="cell-sm"><div>One of three columns</div></div>
<div class="cell-sm"><div>One of three columns</div></div>
<div class="cell-sm"><div>One of three columns</div></div>
</div>
</div>
<p>
The above example creates three equal-width columns on small, medium, large, and extra large devices using our predefined grid classes.
Those columns are centered in the page with the parent <code>.container</code>.
</p>
<p>
Breaking it down, here’s how it works:
</p>
<ul>
<li>Containers provide a means to center your site’s contents. Use <code>.container</code> for fixed width or <code>.container-fluid</code> for full width.</li>
<li>User rows grouping with <code>.grid</code> container</li>
<li>Rows are horizontal groups of columns that ensure your columns are lined up properly. We use the negative margin method on <span class="tally">.row</span> to ensure all your content is aligned properly down the left side.</li>
<li>Content should be placed within columns, and only columns may be immediate children of rows.</li>
<li>Grid columns without a set width will automatically layout with equal widths. For example, four instances of <span class="tally">.cell-sm</span> will each automatically be <span class="tally">25%</span> wide for small breakpoints.</li>
<li>Column classes indicate the number of columns you’d like to use out of the possible 12 per row. So, if you want three equal-width columns, you can use <span class="tally">.cell-sm-4</span>.</li>
<li>Column widths are set in percentallyes, so they’re always fluid and sized relative to their parent element.</li>
<li>Columns have horizontal padding to create the gutters between individual columns, however, you can remove the margin from rows and padding from columns with <span class="tally">.no-gap</span> on the <span class="tally">.row</span> or on the <span class="tally">.grid</span> for all rows in grid.</li>
<li>There are five grid tiers, one for each <a href="#">responsive breakpoint</a>: small (sm), medium (md), large (lg), extra large (xl) and ultra large (xxl).</li>
<li>Grid tiers are based on minimum widths, meaning they apply to that one tier and all those above it (e.g., <span class="tally">.cell-md-4</span> applies to medium, large, extra large and ultra large devices).</li>
<li>You can use predefined grid classes for more semantic markup.</li>
</ul>
<pre class=""><code>
<!-- Grouping rows -->
<div class="grid">
<div class="row">
<div class="cell"></div>
...
<div class="cell"></div>
</div>
...
<div class="row">
<div class="cell"></div>
...
<div class="cell"></div>
</div>
</div>
<!-- Single row -->
<div class="row">
<div class="cell"></div>
...
<div class="cell"></div>
</div>
<!-- Nested row -->
<div class="row">
<div class="cell">
<div class="row">
<div class="cell"></div>
...
<div class="cell"></div>
</div>
</div>
</div>
</code></pre>
<h3 id="_colspan">Colspan</h3>
<p>
If you need to combine columns, there are appropriate classes for this: <span class="tally">.cell-1</span> through <span class="tally">.cell-12</span> and specific media offsets <span class="tally">.cell-*-1</span> through <span class="tally">.cell-*-12</span>.
</p>
<div class="container-fluid p-5 border border-4 bd-grayWhite mt-3 mb-3 d-none d-block-md">
<div class="grid demo-grid">
<div class="row">
<div class="cell colspan-1"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
</div>
<div class="row">
<div class="cell colspan-2"><div>colspan2</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
</div>
<div class="row">
<div class="cell colspan-3"><div>colspan3</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
</div>
<div class="row">
<div class="cell colspan-4"><div>colspan4</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
</div>
</div>
</div>
<pre class=""><code>
<div class="row">
<div class="cell-4"></div>
<div class="cell-4"></div>
<div class="cell-4"></div>
</div>
<div class="row">
<div class="colspan-4"></div>
<div class="colspan-4"></div>
<div class="colspan-4"></div>
</div>
</code></pre>
<h3 id="_offset">Offset</h3>
<p>
If you need to shift the column, there are appropriate classes for this: <span class="tally">.offset-1</span> through <span class="tally">.offset-12</span> and specific media offsets <span class="tally">.offset-*-1</span> through <span class="tally">.offset-*-12</span>.
</p>
<div class="container-fluid p-5 border border-4 bd-grayWhite mt-3 mb-3 d-none d-block-md">
<div class="grid demo-grid">
<div class="row">
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
</div>
<div class="row">
<div class="cell offset-1"><div>offset1</div></div>
</div>
<div class="row">
<div class="cell offset-2"><div>offset2</div></div>
</div>
<div class="row">
<div class="cell offset-3"><div>offset3</div></div>
</div>
</div>
</div>
<pre class=""><code>
<div class="row">
<div class="cell offset-1"></div>
</div>
<div class="row">
<div class="cell offset-2"></div>
</div>
<div class="row">
<div class="cell offset-3"></div>
</div>
</code></pre>
<h3 id="_media_columns">Media columns</h3>
<p>
There are five grid tiers, one for each <a href="#">responsive breakpoint</a>: small (sm), medium (md), large (lg), extra large (xl) and ultra large (xxl).
</p>
<table class="table cell-border table-border cell-media-table">
<thead>
<tr>
<td style="width: 200px">Breakpoints</td>
<td>min-width</td>
</tr>
</thead>
<tbody>
<tr>
<td class="bg-light">sm</td>
<td>576px</td>
</tr>
<tr>
<td class="bg-light">md</td>
<td>768px</td>
</tr>
<tr>
<td class="bg-light">lg</td>
<td>992px</td>
</tr>
<tr>
<td class="bg-light">xl</td>
<td>1200px</td>
</tr>
<tr>
<td class="bg-light">xxl</td>
<td>1452px</td>
</tr>
</tbody>
</table>
<p>
You can use predefined grid classes for more semantic markup.
</p>
<table class="table cell-border table-border cell-media-table">
<thead>
<tr>
<td style="width: 200px">Target</td>
<td>Media</td>
<td class="d-none d-block-md">Example</td>
</tr>
</thead>
<tbody>
<tr>
<td style="width: 200px" class="bg-light">colspan</td>
<td>cell-@-*</td>
<td class="d-none d-block-md">cell-md-3</td>
</tr>
<tr>
<td class="bg-light">offset</td>
<td>offset-@-*</td>
<td class="d-none d-block-md">offset-md-3</td>
</tr>
<tr>
<td class="bg-light">ordering</td>
<td>order-@-*</td>
<td class="d-none d-block-md">order-md-3</td>
</tr>
<tr>
<td class="bg-light">width auto</td>
<td>cell-@-auto</td>
<td class="d-none d-block-md">cell-md-auto</td>
</tr>
<tr>
<td class="bg-light">width 100%</td>
<td>cell-@-full</td>
<td class="d-none d-block-md">cell-md-full</td>
</tr>
<tr>
<td class="bg-light">width 100%</td>
<td>cell-@</td>
<td class="d-none d-block-md">cell-md</td>
</tr>
<tr>
<td class="bg-light">width 25%</td>
<td>cell-@-quarter</td>
<td class="d-none d-block-md">cell-md-quarter</td>
</tr>
<tr>
<td class="bg-light">width 50%</td>
<td>cell-@-half</td>
<td class="d-none d-block-md">cell-md-half</td>
</tr>
<tr>
<td class="bg-light">width 1/3</td>
<td>cell-@-one-third</td>
<td class="d-none d-block-md">cell-md-one-third</td>
</tr>
<tr>
<td class="bg-light">width 2/3</td>
<td>cell-@-two-third</td>
<td class="d-none d-block-md">cell-md-two-third</td>
</tr>
</tbody>
</table>
<div class="container-fluid p-5 border border-4 bd-grayWhite mt-3 mb-3 d-none d-block-md">
<div class="grid demo-grid">
<div class="row">
<div class="cell-sm-full cell-md-one-third cell-lg-3"><div>1</div></div>
<div class="cell-sm-full cell-md-two-third cell-lg-3"><div>1</div></div>
<div class="cell-sm-full cell-md-half cell-lg-3"><div>1</div></div>
<div class="cell-sm-full cell-md-half cell-lg-3"><div>1</div></div>
</div>
</div>
</div>
<pre class=""><code>
<div class="row">
<div class="cell-sm-full cell-md-one-third cell-lg-3"></div>
<div class="cell-sm-full cell-md-two-third cell-lg-3"></div>
<div class="cell-sm-full cell-md-half cell-lg-3"></div>
<div class="cell-sm-full cell-md-half cell-lg-3"></div>
</div>
</code></pre>
<h3 id="_gaps">Gaps</h3>
<p>
The gaps between columns in our predefined grid classes can be removed with <span class="tally">.no-gap</span>. This removes the negative margins from <span class="tally">.row</span> and the horizontal padding from all immediate children columns.
</p>
<div class="container-fluid p-5 border border-4 bd-grayWhite mt-3 mb-3 d-none d-block-md">
<h5>With gaps</h5>
<div class="grid demo-grid gaps-demo">
<div class="row">
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
</div>
<div class="row">
<div class="cell colspan-2"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
</div>
<div class="row">
<div class="cell colspan-4"><div>1</div></div>
<div class="cell colspan-4"><div>1</div></div>
<div class="cell colspan-4"><div>1</div></div>
</div>
</div>
<h5>No gaps</h5>
<div class="grid no-gap demo-grid gaps-demo">
<div class="row">
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
</div>
<div class="row">
<div class="cell colspan-2"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
<div class="cell"><div>1</div></div>
</div>
<div class="row">
<div class="cell colspan-4"><div>1</div></div>
<div class="cell colspan-4"><div>1</div></div>
<div class="cell colspan-4"><div>1</div></div>
</div>
</div>
</div>
<pre class=""><code>
<div class="grid no-gap">...</div>
<div class="row no-gap">...</div>
</code></pre>
<h3 id="_stub_column">Stub column</h3>
<p>
With class <span class="tally">.stub</span> you can create column with fixed width.
</p>
<div class="container-fluid p-5 border border-4 bd-grayWhite mt-3 mb-3 d-none d-block-md">
<div class="grid demo-grid">
<div class="row">
<div class="stub" style="width: 300px"><div>Stub column</div></div>
<div class="cell"><div>1</div></div>
</div>
</div>
</div>
<pre class=""><code>
<div class="row">
<div class="stub" style="width: 300px"></div>
<div class="cell"></div>
</div>
</code></pre>
<h3 id="_ordering">Ordering</h3>
<p>
You can use classes <span class="tally">.order-*</span> to set order columns.
</p>
<div class="container-fluid p-5 border border-4 bd-grayWhite mt-3 mb-3 d-none d-block-md">
<div class="grid demo-grid">
<div class="row">
<div class="cell order-2"><div>Order 2</div></div>
<div class="cell order-1"><div>Order 1</div></div>
</div>
</div>
</div>
<pre class=""><code>
<div class="row">
<div class="cell order-2">Order 2</div>
<div class="cell order-1">Order 1</div>
</div>
</code></pre>
<h3 id="_nested_rows">Nested rows</h3>
<p>
Metro 4 supports nested rows.
</p>
<div class="container-fluid p-5 border border-4 bd-grayWhite mt-3 mb-3 d-none d-block-md">
<div class="grid demo-grid">
<div class="row">
<div class="cell"><div>Cell 1</div></div>
<div class="cell"><div>Cell 2</div></div>
<div class="cell"><div>Cell 2</div></div>
<div class="cell"><div>Cell 3</div></div>
</div>
<div class="row">
<div class="cell">
<div class="row">
<div class="cell"><div>Nested row</div></div>
<div class="cell">
<div class="row">
<div class="cell"><div>Nested row</div></div>
<div class="cell"><div>Nested row</div></div>
<div class="cell"><div>Nested row</div></div>
</div>
<div class="row">
<div class="cell"><div>Nested row</div></div>
<div class="cell"><div>Nested row</div></div>
<div class="cell"><div>Nested row</div></div>
</div>
</div>
<div class="cell"><div>Nested row</div></div>
</div>
<div class="row">
<div class="cell">
<div class="row">
<div class="cell"><div>Nested row</div></div>
<div class="cell"><div>Nested row</div></div>
<div class="cell"><div>Nested row</div></div>
</div>
<div class="row">
<div class="cell"><div>Nested row</div></div>
<div class="cell"><div>Nested row</div></div>
<div class="cell"><div>Nested row</div></div>
</div>
<div class="row">
<div class="cell"><div>Nested row</div></div>
<div class="cell"><div>Nested row</div></div>
<div class="cell"><div>Nested row</div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<pre class=""><code>
<div class="row">
<div class="cell">
<div class="row">
<div class="cell"></div>
...
<div class="cell"></div>
</div>
</div>
</div>
</code></pre>
<h3 id="_alignment">Alignment columns</h3>
<p>
To vertical and horizontal align column you can use flexbox alignment utilities classes.
</p>
<h4 id="_alignment_columns_v">Vertical alignment</h4>
<p>
For vertical alignment all cells in a row:
<span class="tally">.flex-align-start</span>,
<span class="tally">.flex-align-end</span>,
<span class="tally">.flex-align-center</span>,
<span class="tally">.flex-align-stretch</span>,
<span class="tally">.flex-align-baseline</span>,
</p>
<p>
For vertical alignment self cell in a row:
<span class="tally">.flex-align-self-start</span>,
<span class="tally">.flex-align-self-end</span>,
<span class="tally">.flex-align-self-center</span>,
<span class="tally">.flex-align-self-stretch</span>,
<span class="tally">.flex-align-self-baseline</span>,
</p>
<div class="container-fluid p-5 border border-4 bd-grayWhite mt-3 mb-3 d-none d-block-md demo-grid">
<div class="row flex-align-start bg-light" style="height: 10rem;">
<div class="cell"><div>cell</div></div>
<div class="cell"><div>cell</div></div>
<div class="cell"><div>cell</div></div>
</div>
<br/>
<div class="row flex-align-center bg-light" style="height: 10rem;">
<div class="cell"><div>cell</div></div>
<div class="cell"><div>cell</div></div>
<div class="cell"><div>cell</div></div>
</div>
<br />
<div class="row flex-align-end bg-light" style="height: 10rem;">
<div class="cell"><div>cell</div></div>
<div class="cell"><div>cell</div></div>
<div class="cell"><div>cell</div></div>
</div>
</div>
<pre class=""><code>
<div class="row flex-align-start">
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
</div>
<br/>
<div class="row flex-align-center">
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
</div>
<br />
<div class="row flex-align-end">
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
</div>
</code></pre>
<div class="container-fluid p-5 border border-4 bd-grayWhite mt-3 mb-3 d-none d-block-md demo-grid">
<div class="row bg-light" style="height: 10rem;">
<div class="cell flex-align-self-start"><div>start</div></div>
<div class="cell flex-align-self-center"><div>center</div></div>
<div class="cell flex-align-self-end"><div>end</div></div>
</div>
</div>
<pre class=""><code>
<div class="row">
<div class="cell flex-align-self-start"></div>
<div class="cell flex-align-self-center"></div>
<div class="cell flex-align-self-end"></div>
</div>
</code></pre>
<h4 id="_alignment_columns_h">Horizontal alignment</h4>
<p>
For horizontal alignment cells in a row:
<span class="tally">.flex-justify-start</span>,
<span class="tally">.flex-justify-end</span>,
<span class="tally">.flex-justify-center</span>,
<span class="tally">.flex-justify-between</span>,
<span class="tally">.flex-justify-around</span>,
</p>
<div class="container-fluid p-5 border border-4 bd-grayWhite mt-3 mb-3 d-none d-block-md demo-grid">
<div class="row bg-light flex-justify-start">
<div class="cell-4">cell</div>
<div class="cell-4">cell</div>
</div>
<br />
<div class="row bg-light flex-justify-center">
<div class="cell-4">cell</div>
<div class="cell-4">cell</div>
</div>
<br />
<div class="row bg-light flex-justify-end">
<div class="cell-4">cell</div>
<div class="cell-4">cell</div>
</div>
<br />
<div class="row bg-light flex-justify-around">
<div class="cell-4">cell</div>
<div class="cell-4">cell</div>
</div>
<br/>
<div class="row bg-light flex-justify-between">
<div class="cell-4">cell</div>
<div class="cell-4">cell</div>
</div>
</div>
<p>
Also you can use media alignment classes such as <span class="tally">.flex-align-start-*</span>, <span class="tally">.flex-justify-start-*</span> where asterisk is responsive breakpoint (sm, md, lg, xl, xxl)
</p>
</main>
</div>
</div>
<script src="docsearch/docsearch.min.js"></script>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="metro/js/metro.js"></script>
<script src="highlight/highlight.pack.js"></script>
<script src="js/clipboard.min.js"></script>
<script src="js/site.js"></script>
<!-- ads-script -->
<!-- ga-script -->
</body>
</html>