File tree Expand file tree Collapse file tree 1 file changed +35
-2
lines changed
starter/03-CSS-Fundamentals/notes Expand file tree Collapse file tree 1 file changed +35
-2
lines changed Original file line number Diff line number Diff line change @@ -210,10 +210,13 @@ <h3 class="chapter-sub-section-heading">Global Reset</h3>
210
210
of this styling is to override it using the universal selector:
211
211
</ p >
212
212
213
- < code > < pre > * {
213
+ < code >
214
+ < pre >
215
+ * {
214
216
margin: 0;
215
217
padding: 0;
216
- }</ pre >
218
+ }
219
+ </ pre >
217
220
</ code >
218
221
219
222
< p >
@@ -243,5 +246,35 @@ <h3 class="chapter-sub-section-heading">New Properties:</h3>
243
246
</ ul >
244
247
</ article >
245
248
</ article >
249
+
250
+ < article class ="chapter ">
251
+ < h2 class ="chapter-heading "> Ch. 37 Centering Our Page</ h2 >
252
+ < p >
253
+ A simple way to center the page would be to place the entire page's body into
254
+ a container, then set that container's width to a constant value and set the
255
+ left and right margin to auto:
256
+ </ p >
257
+
258
+ < code >
259
+ < pre >
260
+ <head>
261
+ ...
262
+ <style>
263
+ .container {
264
+ width: 800px;
265
+ margin: 0 auto;
266
+ }
267
+ </style>
268
+ </head>
269
+ <body>
270
+ <div class="container">. . .</div>
271
+ </body>
272
+ </ pre >
273
+ </ code >
274
+
275
+ < p >
276
+ There is no specific element that semantically represents this container, so < code > <div></ code > is fine
277
+ </ p >
278
+ </ article >
246
279
</ body >
247
280
</ html >
You can’t perform that action at this time.
0 commit comments