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
@@ -741,7 +739,7 @@ <h2>Working with images <span style="font-size: 22px;">(Group exercise - Part 2)
741
739
<p>It's based on using the html file that you're working on as the starting point to find your image source.</p>
742
740
<p>Right now, <code>llc.gif</code> in the <strong>same folder</strong> as <code>index.html</code>.</p>
743
741
<olclass="spacey_list" start="2">
744
-
<li>Open the <ahref="exercises/2_WORKING_WITH_IMAGES/img/images.html" target="_blank"><code>images.html</code></a> file in the <code>img</code> folder in Sublime Text.</li>
742
+
<li>Open the <ahref="exercises/2_WORKING_WITH_IMAGES/images/images.html" target="_blank"><code>images.html</code></a> file in the <code>img</code> folder in Sublime Text.</li>
745
743
<li>Click on the above link to also view <code>images.html</code> in Chrome. </li>
746
744
<li>Note that there's already an <code>img</code> tag in <code>images.html</code> trying to embed <code>llc.gif</code>.</li>
747
745
</ol>
@@ -770,17 +768,17 @@ <h2>Working with images <span style="font-size: 22px;">(Group exercise - Part 3)
770
768
<h2>Working with images <spanstyle="font-size: 22px;">(Group exercise - Part 4)</span></h2>
771
769
<p>However, it's best practice to organize your images into its own folder to keep your website's file structure tidy.</p>
772
770
<pclass="sidenote">We tend to also organize JavaScript files into their own "js" folder and CSS files into their own "css" folder.</p>
773
-
<p>So let's <strong>move all of our images into the <code>img</code> folder</strong> of <code>2_WORKING_WITH_IMAGES</code>.</p>
771
+
<p>So let's <strong>move all of our images into the <code>images</code> folder</strong> of <code>2_WORKING_WITH_IMAGES</code>.</p>
774
772
<p>Uh oh! Now our image will be broken in <code>index.html</code> since the image is no longer in the same folder. Let's fix that...</p>
775
773
</article>
776
774
777
775
<!-- SLIDE: HTML -->
778
776
<articleclass='slide slide-list'>
779
777
<h2>Working with images <spanstyle="font-size: 22px;">(Group exercise - Part 5)</span></h2>
780
778
<p>To write a <spanclass="keyword">relative path</span> that goes <strong><em>into</em></strong> a folder, start path with the <strong>folder name</strong> followed by a backslash (<code>/</code>).</p>
<li>Return to <code>index.html</code> and add <code>img/</code> infront of <code>llc.gif</code>.</li>
781
+
<li>Return to <code>index.html</code> and add <code>images/</code> infront of <code>llc.gif</code>.</li>
784
782
</ol>
785
783
<br/><br/><br/>
786
784
<hr/>
@@ -791,7 +789,7 @@ <h2>Working with images <span style="font-size: 22px;">(Group exercise - Part 5)
791
789
<!--
792
790
Bonus: Give this file structure? How would you include the image?
793
791
<p class="sidenote">Transvering <em>over</em> to a parallel folder level would be:</p>
794
-
<pre>src="../folder/img/llc.gif"</pre>
792
+
<pre>src="../folder/images/llc.gif"</pre>
795
793
-->
796
794
797
795
<!-- SLIDE: HTML -->
@@ -1010,14 +1008,14 @@ <h2>CSS selectors and properties</h2>
1010
1008
<h2>Changing the page's background colour</h2>
1011
1009
<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>
1012
1010
<p>Let's add a <code><style></code> tag between the <code><head></code>. Then add this:</p>
1013
-
<pre>body { background: gray; }</pre>
1011
+
<pre>body { background-color: gray; }</pre>
1014
1012
</article>
1015
1013
1016
1014
<!-- SLIDE: CSS -->
1017
1015
<articleclass='slide slide-list'>
1018
1016
<h2>Changing the font colour</h2>
1019
1017
<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 color on the <em>entire</em> page.</p>
@@ -1040,7 +1038,7 @@ <h2>Changing the font family</h2>
1040
1038
<articleclass='slide slide-list'>
1041
1039
<h2>Changing the font family</h2>
1042
1040
<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>
<pclass="sidenote">(Notice how the font-family for the headers 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>
<p>Let's go ahead and set the <code><header></code> and <code><footer></code> to be 960 pixels wide. We'll add a gray border too, so we can see what's going on.</p>
1679
1677
<pre>
1680
1678
header {
1681
-
width: 960px;
1679
+
<strong>width: 960px;</strong>
1682
1680
border: 1px solid gray;
1683
1681
}
1684
1682
1685
1683
footer {
1686
-
width: 960px;
1684
+
<strong>width: 960px;</strong>
1687
1685
border: 1px solid gray;
1688
1686
}
1689
1687
</pre>
@@ -1692,17 +1690,17 @@ <h2>Assigning widths</h2>
1692
1690
<!-- SLIDE: CSS -->
1693
1691
<articleclass='slide slide-list'>
1694
1692
<h2>Assigning widths</h2>
1695
-
<p>If our site is 960px wide, we need to ensure that our columns don't exceed 960 - <strong>including margins!</strong> (e.g. 540 + 20 + 300 = 960)</p>
1693
+
<p>If our site is 960px wide, we need to ensure that our columns don't exceed 960 - <strong>including margins!</strong> (e.g. 640 + 20 + 300 = 960)</p>
1696
1694
<pre>
1697
1695
section {
1698
-
width: 560px;
1696
+
<strong>width: 640px;</strong>
1699
1697
padding: 30px;
1700
1698
border: 1px solid gray;
1701
1699
}
1702
1700
1703
1701
aside {
1704
-
margin-left: 20px;
1705
-
width: 300px;
1702
+
<strong>margin-left: 20px;</strong>
1703
+
<strong>width: 300px;</strong>
1706
1704
border: 1px solid gray;
1707
1705
}
1708
1706
</pre>
@@ -1755,7 +1753,7 @@ <h2>Clearing floats</h2>
1755
1753
<hr/>
1756
1754
<pclass="sidenote">If the elements that are floating are enclosed in another container, you can you apply <code>overflow:auto</code> to the parent container:</p>
1757
1755
<pre>nav {
1758
-
overflow: auto;
1756
+
<strong>overflow: auto;</strong>
1759
1757
}</pre>
1760
1758
1761
1759
<pclass="sidenote">Another way (when all else fails) is via a line break tag with a clear attribute: <code><br clear="all" /></code></p>
0 commit comments