-
Notifications
You must be signed in to change notification settings - Fork 14
/
grid-fixed-creating-grid.html
executable file
·71 lines (58 loc) · 2.71 KB
/
grid-fixed-creating-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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Creating a grid</title>
<link rel="stylesheet" type="text/css" href="c/grid-baseline.css">
<style type="text/css">
body {width: 930px;}
section {position: relative; width: 35em; padding: 6em 0 1em 10em;}
.grid {display: grid; width: 700px; height: 25em;
grid-template-columns: [start col-a] 200px [col-b] 50% [col-c] 100px [stop end last];
grid-template-rows: [start masthead] 3em [content] 80% [footer] 2em [stop end];}
.labels#col {display: grid; grid-template-columns: 200px 50% 100px 5em; grid-template-rows: 6em; width: 700px;}
.labels#row {display: grid; grid-template-rows: [start masthead] 3em [content] 80% [footer] 2em [stop end]; height: 25em;}
.labels#col {position: absolute; top: 0; left: 10em; margin: 0; padding: 1px;}
.labels#row {position: absolute; top: 6em; left: 0; margin: 0; padding: 1px;}
.labels#col li {display: flex; justify-content: end; align-items: start; flex-flow: column;}
.labels#row li {display: flex; justify-content: end; align-items: start; flex-flow: row;}
.labels li.line.label i {color: rebeccapurple; font: 1em Arvo, sans-serif;}
.labels#col li.line.label i {border-left: 1px solid; padding-left: 0.25em;}
.labels#col li i:last-child {padding-bottom: 0.5em;}
.labels#row li.line.label i {border-top: 1px solid; padding-top: 0.25em;}
.labels#row li i:last-child {padding-right: 0.5em;}
.labels#row li i::after {content: " || "; color: silver; margin-right: 0.25em;}
.labels#row li i:last-child::after {content: "";}
.labels .line.col.label {grid-template-row: 1; grid-template-column: auto / span 1;}
.labels .line.row.label {grid-template-column: 1; grid-template-row: auto / span 1;}
</style>
</head>
<body>
<section>
<div class="grid boxed lines">
<span class="gridlines"></span>
<span class="gridlines"></span>
<span class="gridlines"></span>
<span class="gridlines"></span>
<span class="gridlines"></span>
<span class="gridlines"></span>
<span class="gridlines"></span>
<span class="gridlines"></span>
<span class="gridlines"></span>
</div>
<ul class="labels" id="col">
<li class="col line label"><i>start</i><i>col-a</i><i>1</i></li>
<li class="col line label"><i>col-b</i><i>2</i></li>
<li class="col line label"><i>col-c</i><i>3</i></li>
<li class="col line label"><i>stop</i><i>end</i><i>last</i><i>4</i></li>
</ul>
<ul class="labels" id="row">
<li class="col line label"><i>start</i><i>masthead</i><i>1</i></li>
<li class="col line label"><i>content</i><i>2</i></li>
<li class="col line label"><i>footer</i><i>3</i></li>
<li class="col line label"><i>stop</i><i>end</i><i>4</i></li>
</ul>
</section>
</body>
</html>