Skip to content

Commit deb4402

Browse files
author
LinnAlexandra
committed
Continuing minor tweaks of CSS slides
1 parent 7ae83e4 commit deb4402

File tree

2 files changed

+20
-23
lines changed

2 files changed

+20
-23
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

index.html

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -852,8 +852,7 @@ <h1>Social Media</h1>
852852
<a href="http://twitter.com/Linndelicate" target="_blank">Twitter</a>!
853853
</p>
854854
</textarea>
855-
<script type='coder-solution'>
856-
<h1>Welcome!</h1>
855+
<script type='coder-solution'><h1>Welcome!</h1>
857856
<p>This is my website.</p>
858857

859858
<h1>Social Media</h1>
@@ -876,7 +875,7 @@ <h2>CSS selectors and properties</h2>
876875
<p>Here's a CSS declaration dissected:</p>
877876
<p class="centered"><img src="assets/css.png" /></p>
878877
<ul>
879-
<li>A <strong>basic</strong> <span class="keyword">selector</span> will match its HTML tag name. In this case, all content that is a <code>&lt;h1&gt;</code> will be applied this style.<br /><span class="sidenote">(We'll get into more complex ones later.)</span></li>
878+
<li>A <strong>basic</strong> <span class="keyword">selector</span> will match its HTML tag name. In this case, all content that is a <code>&lt;h1&gt;</code> will have this style applied to it.<br /><span class="sidenote">(We'll get into more complex selectors later.)</span></li>
880879
<li>A <span class="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 <a href="http://www.cheatography.com/davechild/cheat-sheets/css2/" target="_blank">cheatsheet</a>.</li>
881880
<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>
882881
</ul>
@@ -888,7 +887,7 @@ <h2>CSS selectors and properties</h2>
888887
<p>Here's a CSS declaration dissected:</p>
889888
<p class="centered"><img src="assets/css.png" /></p>
890889
<ul>
891-
<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>
892891
<li>You can define multiple property:value sets but you must end each one with a <strong>semi-colon</strong> (<code>;</code>).</li>
893892
</ul>
894893
</article>
@@ -897,14 +896,14 @@ <h2>CSS selectors and properties</h2>
897896
<article class='slide slide-list'>
898897
<h2>Changing the page's background colour</h2>
899898
<p>View <code><a href="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>&lt;style&gt;</code> tag between the <code>&lt;head&gt;</code>. Then add this:</p>
899+
<p>Let's add a <code>&lt;style&gt;</code> tag between the <code>&lt;head&gt;</code> tags. Then add this:</p>
901900
<pre>body { background-color: gray; }</pre>
902901
</article>
903902

904903
<!-- SLIDE: CSS -->
905904
<article class='slide slide-list'>
906905
<h2>Changing the font colour</h2>
907-
<p>Now the text is a bit hard to read on the gray background. Because the <code>&lt;body&gt;</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>&lt;body&gt;</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>
908907
<pre>body { background-color: gray; <strong>color: white;</strong> }</pre>
909908
</article>
910909

@@ -927,7 +926,7 @@ <h2>Changing the font family</h2>
927926
<!-- SLIDE: CSS -->
928927
<article class='slide slide-list'>
929928
<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>
931930
<pre>body { background-color: gray; color: white; <strong>font-family: Helvetica, Verdana, Arial, sans-serif;</strong> }</pre>
932931
<p class="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>
933932
</article>
@@ -945,18 +944,18 @@ <h2>Changing the font size</h2>
945944
<p>Headings have default font-sizes defined by the browser. Let's override them. </p>
946945
<pre>h1 { font-family: Courier; <strong>font-size: 25px;</strong> }
947946
h2 { font-family: Courier; <strong>font-size: 22px;</strong> }</pre>
948-
<p class="sidenote">(When you've got more time, read <a href="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+
<p class="sidenote">(When you've got more time, read <a href="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>
949948
</article>
950949

951950
<!-- SLIDE: CSS -->
952951
<article class='slide slide-list'>
953952
<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>
955954
<ul>
956955
<li style="font-weight: normal;">normal</li>
957956
<li style="font-weight: bold;">bold</li>
958957
</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>
960959
<pre>h1 { font-family: Courier; font-size: 25px; <strong>font-weight: normal;</strong> }
961960
h2 { font-family: Courier; font-size: 22px; <strong>font-weight: normal;</strong> }</pre>
962961
</article>
@@ -995,7 +994,7 @@ <h2>Formatting CSS</h2>
995994
<h2>The "Box Model"</h2>
996995
<p>Most HTML elements on a webpage look like this to the browser:</p>
997996
<p class="centered"><img src="assets/box-model.gif" width="536" height="289" alt="box model" /></p>
998-
<p>This is the same but visualized differently:</p>
997+
<p>This is the same idea but visualized differently:</p>
999998
<p class="centered"><img src="assets/box-model.png" width="517" height="476" alt="box model" /></p>
1000999
</article>
10011000

@@ -1200,9 +1199,9 @@ <h2>The "Box Model"</h2>
12001199
text-decoration: none;
12011200
margin: 15px 10px 0 0;
12021201

1203-
border-radius: 6px;
12041202
-moz-border-radius: 6px;
12051203
-webkit-border-radius: 6px;
1204+
border-radius: 6px;
12061205
}
12071206
&lt;/style&gt;
12081207

@@ -1212,14 +1211,14 @@ <h2>The "Box Model"</h2>
12121211
</script>
12131212

12141213
<br clear="all" />
1215-
<p class="sidenote"><strong>Advanced topic:</strong> To get it looking even more like a button, use the <code>border-radius</code> property.<br />
1216-
<span class="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+
<p class="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+
<span class="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>
12171216
</article>
12181217

12191218
<!-- SLIDE: CSS -->
12201219
<article class='slide slide-list'>
12211220
<h2>CSS interactions &amp; 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>
12231222
<p>As part of your selector, you need to use the <code>:hover</code> <span class="keyword">pseudo selector</span>.</p>
12241223

12251224
<textarea class="coder-editor">
@@ -1232,9 +1231,9 @@ <h2>CSS interactions &amp; pseudo selectors</h2>
12321231
text-decoration: none;
12331232
margin: 15px 10px 0 0;
12341233

1235-
border-radius: 6px;
12361234
-moz-border-radius: 6px;
12371235
-webkit-border-radius: 6px;
1236+
border-radius: 6px;
12381237
}
12391238

12401239
a:hover {
@@ -1255,9 +1254,9 @@ <h2>CSS interactions &amp; pseudo selectors</h2>
12551254
text-decoration: none;
12561255
margin: 15px 10px 0 0;
12571256

1258-
border-radius: 6px;
12591257
-moz-border-radius: 6px;
12601258
-webkit-border-radius: 6px;
1259+
border-radius: 6px;
12611260
}
12621261

12631262
a:hover {
@@ -1331,17 +1330,17 @@ <h2>CSS classes</h2>
13311330
&lt;/p&gt;
13321331
</script>
13331332
<br clear="all" />
1334-
<p class="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+
<p class="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>
13351334
</article>
13361335

13371336
<!-- SLIDE: CSS -->
13381337
<article class='slide slide-list'>
13391338
<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>
13411340
<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 />
13431342
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 />
13451344
e.g. <code>class="nav_button"</code></li>
13461345
</ul>
13471346

0 commit comments

Comments
 (0)