-
Notifications
You must be signed in to change notification settings - Fork 14
/
subgrid-footer-own-rows.html
executable file
·80 lines (76 loc) · 2.11 KB
/
subgrid-footer-own-rows.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
<!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>Placing the footer’s pieces on the body’s columns</title>
<link rel="stylesheet" type="text/css" href="c/grid-baseline.css">
<style type="text/css">
@import url(c/subgrid-baseline.css);
body > *:not(#null) {padding-inline: 0;}
header.site > * {background: hsla(0deg,50%,50%,0.25);}
footer.site > * {background: hsla(240deg,50%,50%,0.25);}
footer.site > .rowline {grid-column: 1 / -1; grid-row: 2;
background: transparent; border-top: 1px dashed #000A;}
</style>
<style type="text/css">
body {display: grid; grid-template-columns: repeat(16,1fr); grid-template-rows: repeat(3,min-content);}
:is(header, footer).site {grid-column: 1 / -1;}
main {grid-column: 2 / -2;}
header.site {display: grid; grid-template-columns: subgrid;}
header.site h1 {grid-column: 2 / span 5;}
header.site nav {grid-column: span 7 / -2; align-self: center; text-align: end;}
footer.site {display: grid; grid-template-columns: subgrid; grid-template-rows: repeat(2,auto);}
footer.site img {grid-column: 5; grid-row: 1 / -1;}
footer.site nav {grid-column: 9 / -2; }
footer.site div {grid-column: span 7 / -2; grid-row: 2;}
</style>
</head>
<body>
<header class="site">
<h1>ConHugeCo</h1>
<nav>
<a href="…">Home</a>
<a href="…">Mission</a>
<a href="…">Products</a>
<a href="…">Services</a>
<a href="…">Support</a>
<a href="…">Contact</a>
</nav>
</header>
<main>
…
</main>
<footer class="site">
<img src="i/conhugeco.png" class="logo">
<nav>
<a href="…">Home</a>
<a href="…">Mission</a>
<a href="…">Products</a>
<a href="…">Services</a>
<a href="…">Support</a>
<a href="…">Contact</a>
</nav>
<div class="sosumi">Copyleft 2112 ConHugeCo Inc. All lefts reserved.</div>
<span class="rowline"></span>
</footer>
<ul class="lines">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</body>
</html>