-
Notifications
You must be signed in to change notification settings - Fork 17
/
grid-flexible-four-columns.html
executable file
·44 lines (38 loc) · 1.36 KB
/
grid-flexible-four-columns.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
<!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>Dividing the container into four columns</title>
<link rel="stylesheet" type="text/css" href="c/grid-baseline.css">
<style type="text/css">
body {width: 670px; padding: 2em;}
section {position: relative;}
.grid {display: grid; width: 600px; height: 15em;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-rows: 1fr;}
.gridlines {display: grid;}
.gridlines i {height: 1.2em; font: italic 1.5em Gentium Basic, serif;}
.gridlines i.col.measure {align-self: center; justify-self: stretch;
text-align: center; height: 1.2em;
background:
linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)),
url(i/arrow-left.svg) 0 50% / 0.5em,
url(i/arrow-right.svg) 100% 50% / 0.5em,
radial-gradient(white, white 1em, transparent 1.5em),
linear-gradient(transparent 45%, black 45%, black 55%, transparent 55%);
background-repeat: no-repeat;
}
</style>
</head>
<body>
<section>
<div class="grid boxed lines">
<span class="gridlines"><i class="col measure">1fr</i></span>
<span class="gridlines"><i class="col measure">1fr</i></span>
<span class="gridlines"><i class="col measure">1fr</i></span>
<span class="gridlines"><i class="col measure">1fr</i></span>
</div>
</section>
</body>
</html>