You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li>A <strong>basic</strong><spanclass="keyword">selector</span> will match its HTML tag name. In this case, all content that is a <code><h1></code> will be applied this style.<br/><spanclass="sidenote">(We'll get into more complex ones later.)</span></li>
878
+
<li>A <strong>basic</strong><spanclass="keyword">selector</span> will match its HTML tag name. In this case, all content that is a <code><h1></code> will have this style applied to it.<br/><spanclass="sidenote">(We'll get into more complex selectors later.)</span></li>
880
879
<li>A <spanclass="keyword">property</span> is a special label for some visual aspect of the selector such as colour or size. You can see a list of them in this <ahref="http://www.cheatography.com/davechild/cheat-sheets/css2/" target="_blank">cheatsheet</a>.</li>
881
880
<li>The property <strong>value</strong> is specific to the property type. For example, <code>color</code> properties accept colour values like <code>blue</code> or <code>#FFFF00</code>. <code>font-size</code> properties accept units of measurements like <code>12px</code> (where "px" stands for pixels).</li>
882
881
</ul>
@@ -888,7 +887,7 @@ <h2>CSS selectors and properties</h2>
<li>Use <strong>curly braces</strong> (<code>{}</code>) to hold a list of the property:value sets.</li>
890
+
<li>Use <strong>curly braces</strong> (<code>{}</code>) to hold property:value sets.</li>
892
891
<li>You can define multiple property:value sets but you must end each one with a <strong>semi-colon</strong> (<code>;</code>).</li>
893
892
</ul>
894
893
</article>
@@ -897,14 +896,14 @@ <h2>CSS selectors and properties</h2>
897
896
<articleclass='slide slide-list'>
898
897
<h2>Changing the page's background colour</h2>
899
898
<p>View <code><ahref="exercises/3_CSS/index.html" target="_blank">exercises/3_CSS/index.html</a></code> in your browser. Notice how we're using a transparent PNG so it's hard to read all the white letters on a white background.</p>
900
-
<p>Let's add a <code><style></code> tag between the <code><head></code>. Then add this:</p>
899
+
<p>Let's add a <code><style></code> tag between the <code><head></code> tags. Then add this:</p>
901
900
<pre>body { background-color: gray; }</pre>
902
901
</article>
903
902
904
903
<!-- SLIDE: CSS -->
905
904
<articleclass='slide slide-list'>
906
905
<h2>Changing the font colour</h2>
907
-
<p>Now the text is a bit hard to read on the gray background. Because the <code><body></code> tag is the highest possible visible HTML tag, the <code>body</code> selector will also allow us to target the font colour on the <em>entire</em> page.</p>
906
+
<p>Now the text is a bit hard to read on the grey background. Because the <code><body></code> tag is the highest possible visible HTML tag, the <code>body</code> selector will also allow us to target the font colour on the <em>entire</em> page.</p>
@@ -927,7 +926,7 @@ <h2>Changing the font family</h2>
927
926
<!-- SLIDE: CSS -->
928
927
<articleclass='slide slide-list'>
929
928
<h2>Changing the font family</h2>
930
-
<p>Not all fonts are installed on all computers so it's recommended that you use a list of fonts. If the first font in the list isn't available, it will try to use the next.</p>
929
+
<p>Not all fonts are installed on all computers so it's recommended that you use a list of fonts, ordered by preference. If the first font in the list isn't available, the browser will try to use the next font, and so on.</p>
<pclass="sidenote">(Notice how the font-family for the headings are still Courier? That's the "cascading" part of Cascading Style Sheets in action. Inline styles take precedence, then innermost tags, then outer tags.)</p>
933
932
</article>
@@ -945,18 +944,18 @@ <h2>Changing the font size</h2>
945
944
<p>Headings have default font-sizes defined by the browser. Let's override them. </p>
<pclass="sidenote">(When you've got more time, read <ahref="http://kyleschaeffer.com/best-practices/css-font-size-em-vs-px-vs-pt-vs/" target="_blank">this article</a> for more info on font unit sizes.</p>
947
+
<pclass="sidenote">(When you've got more time, read <ahref="http://kyleschaeffer.com/best-practices/css-font-size-em-vs-px-vs-pt-vs/" target="_blank">this article</a> for more info on font unit sizes.)</p>
949
948
</article>
950
949
951
950
<!-- SLIDE: CSS -->
952
951
<articleclass='slide slide-list'>
953
952
<h2>Changing the font weight</h2>
954
-
<p>In its simplest form, there are 2 weights:</p>
953
+
<p>In its simplest form, there are two possible values you can set as a font's weight:</p>
955
954
<ul>
956
955
<listyle="font-weight: normal;">normal</li>
957
956
<listyle="font-weight: bold;">bold</li>
958
957
</ul>
959
-
<p>By default, headings are already bolded. Let's remove the bold by applying the <em>normal</em> font weight on them.</p>
958
+
<p>By default, headings are already bolded. Let's remove the bold by applying the <em>normal</em> font weight to them.</p>
<pclass="sidenote"><strong>Advanced topic:</strong> To get it looking even more like a button, use the <code>border-radius</code> property.<br/>
1216
-
<spanclass="sidenote">(We won't get into browser pre-fixes today but do know that newer CSS features require you to re-state the property for each browser vendor.)</span></p>
1214
+
<pclass="sidenote"><strong>Advanced topic:</strong> To get it looking even more like a button, use the <code>border-radius</code> property to round the corners.<br/>
1215
+
<spanclass="sidenote">(We won't get into browser pre-fixes today, but note that newer CSS features like this one require you to re-state the property for each browser vendor. That's why the <code>border-radius</code> property is repeated three times, with <code>-moz-</code> and <code>-webkit-</code> before it.)</span></p>
1217
1216
</article>
1218
1217
1219
1218
<!-- SLIDE: CSS -->
1220
1219
<articleclass='slide slide-list'>
1221
1220
<h2>CSS interactions & pseudo selectors</h2>
1222
-
<p>CSS is also able to handle some basic UI interactions in our sites, such as allowing a mouse-over or "hover" state on various elements. This is frequently done with items such as links.</p>
1221
+
<p>CSS is also able to handle some basic user interactions, such as allowing a mouse-over or "hover" state on various elements. This is frequently done with items such as links.</p>
1223
1222
<p>As part of your selector, you need to use the <code>:hover</code><spanclass="keyword">pseudo selector</span>.</p>
1224
1223
1225
1224
<textareaclass="coder-editor">
@@ -1232,9 +1231,9 @@ <h2>CSS interactions & pseudo selectors</h2>
1232
1231
text-decoration: none;
1233
1232
margin: 15px 10px 0 0;
1234
1233
1235
-
border-radius: 6px;
1236
1234
-moz-border-radius: 6px;
1237
1235
-webkit-border-radius: 6px;
1236
+
border-radius: 6px;
1238
1237
}
1239
1238
1240
1239
a:hover {
@@ -1255,9 +1254,9 @@ <h2>CSS interactions & pseudo selectors</h2>
1255
1254
text-decoration: none;
1256
1255
margin: 15px10px00;
1257
1256
1258
-
border-radius: 6px;
1259
1257
-moz-border-radius: 6px;
1260
1258
-webkit-border-radius: 6px;
1259
+
border-radius: 6px;
1261
1260
}
1262
1261
1263
1262
a:hover{
@@ -1331,17 +1330,17 @@ <h2>CSS classes</h2>
1331
1330
</p>
1332
1331
</script>
1333
1332
<brclear="all" />
1334
-
<pclass="sidenote">Now that's a lot of CSS! What if you change you mind and decide that the background colour should be blue now? Plus you can't apply pseudo selectors like <code>:hover</code> inline.</p>
1333
+
<pclass="sidenote">Now that's a lot of CSS! What if you change your mind and decide that the background colour should be blue now? Plus you can't apply pseudo selectors like <code>:hover</code> inline.</p>
1335
1334
</article>
1336
1335
1337
1336
<!-- SLIDE: CSS -->
1338
1337
<articleclass='slide slide-list'>
1339
1338
<h2>CSS classes</h2>
1340
-
<p>If you know that several elements are going to have similar styles, use CSS classes! Once you define one CSS class, you can apply it over and over again!</p>
1339
+
<p>If you know that several elements are going to have similar styles, use CSS classes! Once you define one CSS class, you can apply it over and over again.</p>
1341
1340
<ul>
1342
-
<li>Use a <strong>period</strong> (<code>.</code>) to define CSS selectors that are classes.<br/>
1341
+
<li>In your CSS, use a <strong>period</strong> (<code>.</code>) to define CSS selectors that are classes.<br/>
1343
1342
e.g. <code>.nav_button</code></li>
1344
-
<li>Then apply that class to any element using the <code>class</code> attribute.<br/>
1343
+
<li>Then in your HTML, apply that class to any element using the <code>class</code> attribute.<br/>
0 commit comments