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
Copy file name to clipboardExpand all lines: index.html
+17-49Lines changed: 17 additions & 49 deletions
Original file line number
Diff line number
Diff line change
@@ -1408,7 +1408,7 @@ <h2>CSS classes</h2>
1408
1408
<!-- SLIDE: CSS -->
1409
1409
<articleclass='slide slide-list'>
1410
1410
<h2>External CSS</h2>
1411
-
<p>Instead of duplicating your <code><style></code> content for every webpage, make one single CSS document ending with a <code>.css</code> extension and link to it in the <code><head></code> tag instead of (or in addition to) a <code><style></code> tag.</p>
1411
+
<p>Instead of duplicating your <code><style></code> content for every webpage, make one single CSS document ending with a <code>.css</code> extension, and link to it in the <code><head></code> tag instead of (or in addition to) a <code><style></code> tag.</p>
<li>Update your navigation in <code>index.html</code> to look more button-like.</li>
1443
1443
<li>Create a single <code>styles.css</code> file and link to this external stylesheet from all 3 webpages using the <code><link></code> tag. Consolidate all of your CSS into this external stylesheet.</li>
1444
-
<li>If you've got extra time, try out some new CSS properties from the cheatsheet and other resources listed on the <ahref="#slide-94">CSS resources slide</a>.</li>
1444
+
<li>If you've got extra time, try out some new CSS properties from the cheatsheet and other resources listed on the <ahref="#slide-88">CSS resources slide</a>.</li>
1445
1445
</ul>
1446
-
<h3>Got questions?</h3>
1447
-
<p>
1448
-
Post them to Google Moderator: <ahref="http://goo.gl/mod/c4cm" target="_blank" >http://goo.gl/mod/c4cm</a>
1449
-
</p>
1450
1446
</article>
1451
1447
1452
1448
<!-- SLIDE: CSS -->
1453
1449
<articleclass='slide slide-list'>
1454
1450
<h2>Laying out webpages with CSS</h2>
1455
1451
<p>Layout is one of the most challenging things to do in CSS because it requires you to think about the whole picture and plan ahead.</p>
1456
-
<p>To creating a standard 2-column layout requires us to give dimensions to some of our content, and position it accordingly.</p>
1452
+
<p>Creating a standard 2-column layout requires us to give dimensions to some of our content, and position it accordingly.</p>
@@ -1557,8 +1553,8 @@ <h2>Preparing for our group exercise</h2>
1557
1553
<!-- SLIDE: CSS -->
1558
1554
<articleclass='slide slide-list'>
1559
1555
<h2>Assigning widths</h2>
1560
-
<p>It is important to know the overall width of your site so you can select column widths for the main <code><section></code> and the <code><aside></code> sidebar that will make sense.</p>
1561
-
<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>
1556
+
<p>It is important to know the overall width of your site, so you can select column widths for the main <code><section></code> and the <code><aside></code> sidebar that will make sense.</p>
1557
+
<p>Let's go ahead and set the <code><header></code> and <code><footer></code> to be 960 pixels wide. We'll add a grey border too, so we can see what's going on.</p>
1562
1558
<pre>
1563
1559
header {
1564
1560
<strong>width: 960px;</strong>
@@ -1589,9 +1585,9 @@ <h2>Assigning widths</h2>
1589
1585
border: 1px solid gray;
1590
1586
}
1591
1587
</pre>
1592
-
<pclass="sidenote"><strong>PRO TIP:</strong> Historically, padding wrecked havoc on our math. To avoid headaches, use the <ahref="http://paulirish.com/2012/box-sizing-border-box-ftw/" target="_blank">box-sizing property</a> for every website you make to make sure your math adds up.</p>
1588
+
<pclass="sidenote"><strong>PRO TIP:</strong> Historically, padding could wreak havoc on our column math. To avoid headaches, use the <ahref="http://paulirish.com/2012/box-sizing-border-box-ftw/" target="_blank">box-sizing property</a> for every website you make to make sure your math adds up.</p>
1593
1589
<pre>
1594
-
/* apply a natural box layout model to all elements */
1590
+
/* apply a more intuitive box layout model to all elements */
1595
1591
<strong>* {
1596
1592
-moz-box-sizing: border-box;
1597
1593
-webkit-box-sizing: border-box;
@@ -1634,7 +1630,7 @@ <h2>Clearing floats</h2>
1634
1630
<strong>clear: both;</strong>
1635
1631
}
1636
1632
</pre>
1637
-
<br/><br/><br/>
1633
+
<br/>
1638
1634
<hr/>
1639
1635
<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>
1640
1636
<pre>nav {
@@ -1649,15 +1645,15 @@ <h2>Clearing floats</h2>
1649
1645
<!-- SLIDE: CSS -->
1650
1646
<articleclass='slide slide-list'>
1651
1647
<h2>CSS id's</h2>
1652
-
<p>CSS classes are great when you want to re-apply the same style to multiple HTML elements but sometimes you need to only target an HTML container <strong>once</strong>. This is where an <spanclass="keyword">ID</span> is useful.</p>
1648
+
<p>CSS classes are great when you want to re-apply the same style to multiple HTML elements, but sometimes you only need to target an HTML container <strong>once</strong>. This is where an <spanclass="keyword">ID</span> is useful.</p>
1653
1649
<ul>
1654
-
<li>Use a <strong>hash</strong> (<code>#</code>) to define CSS selectors that are IDs.<br/>
1650
+
<li>In your CSS, use a <strong>hash</strong> (<code>#</code>) to define CSS selectors that are IDs.<br/>
1655
1651
e.g. <code>#centered_on_page</code></li>
1656
-
<li>Use the <code>id</code> attribute to apply the styles to that element.<br/>
1652
+
<li>Then in your HTML, use the <code>id</code> attribute to apply the styles to that element.<br/>
1657
1653
e.g. <code>id="centered_on_page"</code><br/>
1658
1654
</li>
1659
1655
</ul>
1660
-
<pclass="sidenote"><strong>Important!</strong> You should only have <strong>one</strong> instance of an ID per page. Any more can cause unexpected things to happen with your CSS -- and later, JavaScript.</p>
1656
+
<pclass="sidenote"><strong>Important!</strong> You should only have <strong>one</strong> instance of an ID per page. Any more can cause unexpected things to happen with your CSS — and later, JavaScript.</p>
1661
1657
<textareaclass="coder-editor">
1662
1658
<style>
1663
1659
#centered_on_page {
@@ -1731,10 +1727,6 @@ <h2>Hands-on time (now until end)</h2>
1731
1727
<li>Apply some custom colours to your text in any of your web pages.</li>
1732
1728
<li>Research the <code>background-image</code> property and add a background image to webpages.</li>
1733
1729
</ul>
1734
-
<h3>Got questions?</h3>
1735
-
<p>
1736
-
Post them to Google Moderator: <ahref="http://goo.gl/mod/c4cm" target="_blank">http://goo.gl/mod/c4cm</a>
1737
-
</p>
1738
1730
</article>
1739
1731
1740
1732
<!-- SLIDE: CSS -->
@@ -1749,37 +1741,12 @@ <h2>Bonus: Try out web fonts</h2>
1749
1741
</ol>
1750
1742
</article>
1751
1743
1752
-
<!-- SLIDE: CSS -->
1753
-
<articleclass='slide slide-list'>
1754
-
<h2>Bonus: CSS patterns for fun</h2>
1755
-
<p>CSS is great because it can reduce the number of image files you need to create. You can even create <ahref="http://lea.verou.me/css3patterns/#" target="_blank">patterns purely out of CSS</a>!</p>
1756
-
<ol>
1757
-
<li>Click on a pattern that you like.</li>
1758
-
<li>Copy the supplied CSS.</li>
1759
-
<li>Instead of an "ad" in your sidebar, paste the CSS into your <code>aside</code> selector. Or apply it to your <code>body</code> selector to change up the entire page.</li>
1760
-
<li>Important: Due to the differences in CSS support in web browsers, you will need to duplicate the <code>background-image</code> property-value set and replace <code>linear-gradient</code> with <code>-webkit-linear-gradient</code>.</li>
1761
-
</ol>
1762
-
<prestyle="font-size: 14px;">
1763
-
/* Based on Cicada stripes from http://lea.verou.me/css3patterns/#cicada-stripes */
<li>Download a <ahref="http://www.cheatography.com/davechild/cheat-sheets/css2/" target="_blank">cheatsheet of CSS selectors and properties</a>.</li>
1782
-
<li>Try looking up individual selectors and properties using the CSS section of <ahref="https://developer.mozilla.org/en-US/docs/CSS/CSS_Reference" target="_blank">Mozilla's Developer Network</a> for further breakdown.</li>
1749
+
<li>Try looking up individual selectors and properties using the CSS section of <ahref="https://developer.mozilla.org/en-US/docs/CSS/CSS_Reference" target="_blank">Mozilla's Developer Network</a> for a further breakdown.</li>
1783
1750
<li>Read articles from <ahref="http://www.alistapart.com/" target="_blank">A List Apart</a>.</li>
1784
1751
<li>And don't forget the "inspect element" option!</li>
1785
1752
</ul>
@@ -1821,7 +1788,7 @@ <h2>Using FTP to put your site online</h2>
1821
1788
<h2>Where to get this information</h2>
1822
1789
<div>
1823
1790
<p>This information will generally be provided to you by your hosting service provider.</p>
1824
-
<p>There ARE conventions regarding what directory your files go into once you have connected to your server via FTP:</p>
1791
+
<p>There are conventions regarding what directory your files go into once you have connected to your server via FTP, which can differ depending on your host:</p>
1825
1792
<ul>
1826
1793
<li>www</li>
1827
1794
<li>public</li>
@@ -1837,6 +1804,7 @@ <h2>Transferring your files</h2>
1837
1804
<div>
1838
1805
<p>Once you have identified where your files need to go, it is often just a matter of dragging and dropping into your FTP program.</p>
1839
1806
<p>Once this is done, you can check your web address to see how things are looking!</p>
1807
+
<pclass="sidenote">Remember to always have an <code>index.html</code> file if you want people to be able to visit your domain directly. For example, <code>ladieslearningcode.com</code> is actually pointing to <code>ladieslearningcode.com/index.html</code>!</p>
1840
1808
</div>
1841
1809
</article>
1842
1810
@@ -1855,7 +1823,7 @@ <h2>Books</h2>
1855
1823
<articleclass='slide slide-list'>
1856
1824
<h2>Validating your HTML</h2>
1857
1825
<div>
1858
-
<p>One of the best ways to make sure that your HTML is being done correctly is to run it through an HTML validator on occasion.</p>
1826
+
<p>One of the best ways to make sure that your HTML has been written correctly is to run it through an HTML validator on occasion.</p>
1859
1827
<p>You can find the HTML validator at <ahref="http://validator.w3.org/" target="_blank">http://validator.w3.org/</a></p>
0 commit comments