Skip to content

Commit bd97dcd

Browse files
committed
Make part headers in TOC float, so that they don't overlap with content
Issue marijnh#443
1 parent 69e8e8e commit bd97dcd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

html/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<style>
88
article { display: flex; margin: 0 2em; flex-wrap: wrap; max-width: none; max-width: calc(38em + 500px); }
99
#cover { flex-basis: 480px; max-width: 35em; flex-grow: 1; margin-right: 3em; }
10-
#contents { flex-basis: 500px; }
11-
#links { flex-basis: 100%; max-width: 35em; flex-grow: 1; }
10+
#contents { flex-basis: 500px; flex-grow: 1; max-width: 35em; }
11+
#links { flex-basis: 100%; max-width: 35em; }
1212
li.contents-intro:before { display: none; }
13-
.toc h3 { position: absolute; margin: 0; top: 1px; right: 0; font-family: inherit; font-weight: normal; font-size: 90%; }
13+
.toc h3 { float: right; font-family: inherit; margin: 0; font-weight: normal; font-size: 90%; }
1414
@media screen and (max-width: 585px) { .toc h3 { display: none }}
1515
@media screen and (max-width: 500px) { #cover { margin-right: 0 } article { margin: 0 } }
1616
ul.links { list-style-type: circle; }
@@ -71,7 +71,7 @@ <h2>Contents</h2>
7171

7272
<ol class=toc>
7373
<li class="contents-intro"><a href="00_intro.html">Introduction</a>
74-
<li style="counter-reset: li; position: relative">
74+
<li style="counter-reset: li">
7575
<h3>(Part 1: Language)</h3>
7676
<a href="01_values.html">Values, Types, and Operators</a>
7777
</li>
@@ -86,7 +86,7 @@ <h3>(Part 1: Language)</h3>
8686
<li><a href="10_modules.html">Modules</a>
8787
<li><a href="11_async.html">Asynchronous Programming</a>
8888
<li><a href="12_language.html">Project: A Programming Language</a>
89-
<li style="position: relative">
89+
<li>
9090
<h3>(Part 2: Browser)</h3>
9191
<a href="13_browser.html">JavaScript and the Browser</a>
9292
</li>
@@ -96,7 +96,7 @@ <h3>(Part 2: Browser)</h3>
9696
<li><a href="17_canvas.html">Drawing on Canvas</a>
9797
<li><a href="18_http.html">HTTP and Forms</a>
9898
<li><a href="19_paint.html">Project: A Pixel Art Editor</a>
99-
<li style="position: relative">
99+
<li>
100100
<h3>(Part 3: Node)</h3>
101101
<a href="20_node.html">Node.js</a>
102102
</li>

0 commit comments

Comments
 (0)