@@ -154,9 +154,9 @@ Adapting Layouts to Available Space</h3>
154154 using the 'grid-template-rows' and 'grid-template-columns' properties on the <a>grid container</a> ,
155155 and the 'grid-row' and 'grid-column' properties on each <a>grid item</a> .
156156
157- <pre class="example">
158- <style type="text/ css">
159- #grid {
157+ <div class="example">
158+ <pre class="lang- css">
159+ #grid {
160160 display: grid;
161161
162162 /* Two columns: the first sized to content, the second receives
@@ -169,27 +169,30 @@ Adapting Layouts to Available Space</h3>
169169 * row receives the remaining space, but is never smaller than
170170 * the minimum height of the board or stats areas. */
171171 grid-template-rows: auto minmax(min-content, 1fr) auto
172- }
172+ }
173+
174+ /* Each part of the game is positioned between grid lines by
175+ * referencing the starting grid line and then specifying, if more
176+ * than one, the number of rows or columns spanned to determine
177+ * the ending grid line, which establishes bounds for the part. */
178+ #title { grid-column: 1; grid-row: 1 }
179+ #score { grid-column: 1; grid-row: 3 }
180+ #stats { grid-column: 1; grid-row: 2; justify-self: start }
181+ #board { grid-column: 2; grid-row: 1 / span 2; }
182+ #controls { grid-column: 2; grid-row: 3; align-self: center }
183+ </pre>
173184
174- /* Each part of the game is positioned between grid lines by
175- * referencing the starting grid line and then specifying, if more
176- * than one, the number of rows or columns spanned to determine
177- * the ending grid line, which establishes bounds for the part. */
178- #title { grid-column: 1; grid-row: 1 }
179- #score { grid-column: 1; grid-row: 3 }
180- #stats { grid-column: 1; grid-row: 2; justify-self: start }
181- #board { grid-column: 2; grid-row: 1 / span 2; }
182- #controls { grid-column: 2; grid-row: 3; align-self: center }
183- </style>
185+ <pre class="lang-markup">
184186
185- <div id="grid">
186- <div id="title">Game Title</div>
187- <div id="score">Score</div>
188- <div id="stats">Stats</div>
189- <div id="board">Board</div>
190- <div id="controls">Controls</div>
191- </div>
192- </pre>
187+ <div id="grid">
188+ <div id="title">Game Title</div>
189+ <div id="score">Score</div>
190+ <div id="stats">Stats</div>
191+ <div id="board">Board</div>
192+ <div id="controls">Controls</div>
193+ </div>
194+ </pre>
195+ </div>
193196
194197<h3 id='source-independence'>
195198Source-Order Independence</h3>
0 commit comments