Skip to content

Commit 5568ad5

Browse files
Updated all the extra lesson examples to reflect updated main lesson HTML & CSS.
1 parent 1bd29be commit 5568ad5

14 files changed

Lines changed: 327 additions & 287 deletions

framework/extras-form-styles.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ <h2>Center aligning with margin</h2>
9494
To get the input and textarea to span all the way across the form, we can set the width to 100% so it takes up the entire width of the form. It's also possible to override the default border styles too. Add height to the textarea just to give more room for the user to type a message.
9595

9696
```
97-
input,
98-
textarea {
99-
width: 100%;
100-
border: 1px solid #ccc;
101-
padding: 5px;
97+
.contact-form input,
98+
.contact-form textarea {
99+
width: 100%;
100+
border: 1px solid #ccc;
101+
padding: 5px;
102102
}
103-
textarea {
104-
height: 100px;
103+
.contact-form textarea {
104+
height: 100px;
105105
}
106106
```
107107
Your form should look similar to the [contact-page-styles.html](../project/examples/contact-page-styles.html) example.

framework/extras-homepage.html

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -33,76 +33,78 @@
3333
There's many to choose from but this example uses Font Awesome:
3434
[http://fortawesome.github.io/Font-Awesome/](http://fortawesome.github.io/Font-Awesome/)
3535

36-
Under **Getting Started**, there are different options for adding the font files. If using the CDN, remember to add the "http" to make it work when you run your page "locally" (on your computer).
36+
Under **Get Started**, there are different options for adding the font files. If using the CDN, remember to add the "http" to the `href` link make it work when you run your page "locally" (on your computer).
37+
38+
```
39+
&lt;link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
40+
```
3741

38-
Simple to use, pick an icon you'd like to use and copy the supplied markup and class and that's it!
42+
Under the [icons](http://fortawesome.github.io/Font-Awesome/icons/) menu, pick an icon you'd like to use and copy the supplied markup and class and that's it!
3943

4044
###Pseudo Class
4145
A CSS pseudo-class is a selector that specifies a specific *state* of the selected element. This lesson uses `:hover` to apply a style only when the user hovers over the element specified by the selector.
4246

4347
More about pseudo classes: https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes
4448
</section>
4549
<section class="slide" data-markdown>
46-
##Home Page Drop down menu
47-
48-
1. Add [Font Awesome's CSS file](http://fortawesome.github.io/Font-Awesome/get-started/) to the `head` of your document and the markup for the [three-bar icon](http://fortawesome.github.io/Font-Awesome/icon/bars/) to the navigation.
49-
```
50-
&lt;link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
51-
```
52-
```xml
53-
&lt;nav&gt;
54-
&lt;i class=&quot;fa fa-bars&quot; title=&quot;menu&quot;&gt;&lt;/i&gt;
55-
&lt;ul&gt;
56-
&lt;li&gt;&lt;a href=&quot;index.html&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
57-
&lt;li&gt;&lt;a href=&quot;about.html&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
58-
&lt;li&gt;&lt;a href=&quot;contact.html&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
59-
&lt;/ul&gt;
60-
&lt;/nav&gt;
61-
```
62-
It should look like this:
63-
![](img/workshop/menu-with-icon.png)
50+
##Home Page Drop down menu
51+
52+
1. Add [Font Awesome's CSS file](http://fortawesome.github.io/Font-Awesome/get-started/) to the `head` of your document, before your **styles.css**.
53+
```
54+
&lt;link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
55+
```
56+
57+
1. Then add the HTML markup for the [three-bar icon](http://fortawesome.github.io/Font-Awesome/icon/bars/) to the navigation.
58+
```xml
59+
&lt;nav&gt;
60+
&lt;i class=&quot;fa fa-bars&quot; title=&quot;menu&quot;&gt;&lt;/i&gt;
61+
&lt;ul&gt;
62+
&lt;li&gt;&lt;a href=&quot;index.html&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
63+
&lt;li&gt;&lt;a href=&quot;about.html&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
64+
&lt;li&gt;&lt;a href=&quot;contact.html&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
65+
&lt;/ul&gt;
66+
&lt;/nav&gt;
67+
```
68+
It should look like this:
69+
![](img/workshop/menu-with-icon.png)
6470
</section>
6571
<section class="slide" data-markdown>
6672
##Home Page Drop down menu
6773

68-
The next step is to override the horizontal navigation styles that are shared among the other pages and make it specific to the home page. There is already a class of `home` in the body so we can use that to make our selector more specific.
74+
The next step is to override the horizontal navigation styles from the existing CSS and change it back into a dropdown list just for the homepage. There is already a class of `home` in the body so we can use that to make our selector more specific. Put this CSS with the existing home page related CSS.
6975

70-
1. Set the list items to display block so they line up on top of each other.
76+
Set the list items to display block so they line up on top of each other.
7177

72-
```
73-
.home nav li {
78+
.home li {
7479
display: block;
7580
}
76-
```
7781

78-
1. Right align the icon and the list items. This can be added to the `nav` selector so icon and list items will inherit the styles. Change the font size to make it bigger too. The icon will also need a little bit of padding to make the hover target a little bigger and for alignment.
79-
```
82+
Right align the icon and the list items. This can be added to the `nav` selector so icon and list items will inherit the styles. Change the font size to make it bigger too. The icon will also need a little bit of padding to make the hover target a little bigger and for alignment.
83+
8084
.home nav {
8185
text-align: right;
8286
font-size: 25px;
8387
}
8488
.fa-bars {
8589
padding: 15px;
8690
}
87-
```
91+
8892

89-
1. Now hide the navigation list and show it when you hover over the icon. Hide the list first.
90-
```
93+
Now hide the navigation list and show it when you hover over the icon. Hide the list first.
94+
9195
.home nav ul {
9296
display: none;
9397
}
94-
```
9598

96-
1. With CSS, you can apply a hover on a parent element and use the descendant selector to change the style of its child elements!
9799

98-
```
100+
With CSS, you can apply a hover on a parent element and use the descendant selector to change the style of its child elements!
101+
99102
.home nav:hover ul {
100103
display: block;
101104
}
102105
.home a:hover {
103106
color: black;
104107
}
105-
```
106108

107109
Your home page should now look similar to the [homepage-dropdown.html](../project/examples/homepage-dropdown.html) example.
108110
</section>

framework/extras-sticky-footer.html

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,28 @@
4040

4141
We'll be following these instructions: http://css-tricks.com/snippets/css/sticky-footer/
4242

43-
First, we need to create a page wrapper around the page content only, not the footer content. The home page HTML will look like similar to this:
43+
First, we need to create a page wrapper around the page content only, **not** the footer content. The home page HTML will look like similar to this:
4444

4545
```
4646
&lt;div class=&quot;page-wrap&quot;&gt;
47-
&lt;nav&gt;
48-
...
49-
&lt;/nav&gt;
50-
5147
&lt;header&gt;
5248
&lt;h1&gt;Jane Smith&lt;/h1&gt;
5349
&lt;h2&gt;Web Developer + City Girl&lt;/h2&gt;
54-
&lt;/header&gt;
50+
51+
&lt;nav&gt;
52+
...
53+
&lt;/nav&gt;
54+
&lt;/header&gt;
5555
&lt;/div&gt;&lt;!-- close .page-wrap --&gt;
56+
5657
&lt;footer&gt;
5758
...
5859
&lt;/footer&gt;
5960
```
6061

6162
The about and contact pages will look like this:
6263

63-
```
64+
```xml
6465
&lt;div class=&quot;page-wrap&quot;&gt;
6566
&lt;header&gt;
6667
&lt;h1&gt;Jane Smith&lt;/h1&gt;
@@ -70,6 +71,10 @@
7071
...
7172
&lt;/nav&gt;
7273
&lt;/header&gt;
74+
75+
&lt;section>
76+
...
77+
&lt;/section>
7378
&lt;/div&gt;&lt;!-- close .page-wrap --&gt;
7479
&lt;footer&gt;
7580
...
@@ -80,11 +85,9 @@
8085
<section class="slide" data-markdown>
8186
##Sticky Footer CSS
8287

88+
8389
```
8490
/* sticky footer */
85-
html, body {
86-
height: 100%;
87-
}
8891
.page-wrap {
8992
min-height: 100%;
9093
margin-bottom: -35px; /* must be the same height as footer */
@@ -101,6 +104,14 @@
101104
color: #ccc;
102105
}
103106
```
107+
108+
**NOTE**: In the tutorial this lesson is based on, you will see the following CSS included but we've already added it to the CSS when creating the home page background image.
109+
110+
```
111+
html, body {
112+
height: 100%;
113+
}
114+
```
104115
</section>
105116

106117
<section class="slide" data-markdown>
@@ -110,6 +121,7 @@
110121

111122
```
112123
footer {
124+
/* add this to the existing declaration block */
113125
clear: both;
114126
padding: 5px; /* adds space inside the footer */
115127
}
31.8 KB
Loading

index.html

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ <h2>A Basic Web Page</h2>
144144
</section>
145145

146146
<section class="slide">
147-
<h2>Setting Up Our Work Flow</h2>
147+
<h2>Setting Up Your Work Flow</h2>
148148

149149
<p>Inside of the folder you downloaded today (<strong>llc-html-css-multi-page-site-master</strong>), there are many folders and files that contain different content.</p>
150150

@@ -160,7 +160,7 @@ <h2>Setting Up Our Work Flow</h2>
160160
</section>
161161

162162
<section class="slide" data-markdown>
163-
##Setting Up Our Work Flow
163+
##Setting Up Your Work Flow
164164

165165
Let's open the project files in the browser and text editor.
166166

@@ -220,9 +220,7 @@ <h2 id="making-changes">Making changes</h2>
220220
<section class="slide">
221221
<h2>Nesting HTML tags</h2>
222222

223-
<p>Tags are often nested within other tags and make up the <em>document tree</em>. The relationships are just like a family tree; branches of ancestors, parents, children, siblings, etc. Understanding this relationship will come in handy for writing CSS.</p>
224-
225-
<p>Also, whitespace through indentation of nested elements makes HTML easier to read.</p>
223+
<p>Tags are often nested within other tags and make up the <em>document tree</em>. The relationships are just like a family tree; branches of ancestors, parents, children, siblings, etc. Understanding this relationship will come in handy for writing CSS. Also, whitespace through indentation of nested elements makes HTML easier to read.</p>
226224
<pre><code>&lt;!DOCTYPE html&gt;
227225
&lt;html&gt;
228226
&lt;head&gt;&lt;!-- child of html tag, parent of title tag --&gt;
@@ -261,7 +259,7 @@ <h2>Nesting HTML tags</h2>
261259

262260
* `doctype` - Though not an HTML tag, it is always the first line. It tells the browser what version of HTML the document is written in.
263261
* `&lt;html>` - Always first, making it the ancestor of all other elements. It identifies the document as HTML.
264-
* `&lt;head>` - Contains information about the web page but doesn’t display on the web page itself. Examples include the page title (&lt;title>&lt/title>) and links to external CSS files.
262+
* `&lt;head>` - Contains information about the web page but doesn’t display on the web page itself. Examples include the page title (`&lt;title>&lt;/title>`) and links to external CSS files.
265263
* `&lt;body>` - All content to be displayed in the browser window, also known as the viewport, goes between the `body` tags.
266264
</section>
267265

@@ -272,7 +270,7 @@ <h2>Nesting HTML tags</h2>
272270
<section class="slide" data-markdown>
273271
##Adding text
274272

275-
Heading tags are used for headings / page titles. There are six headings tags ranging from `&lt;h1>` to `&lt;h6>` and follow a hierarchy. `&lt;h1>` is the most significant heading on the page.
273+
Heading tags are used for page headings. There are six headings tags ranging from `&lt;h1>` to `&lt;h6>` and follow a hierarchy. `&lt;h1>` is the most significant heading on the page.
276274

277275
```xml
278276
&lt;h1>Name of blog&lt;/h1>
@@ -991,7 +989,15 @@ <h2>Class Exercise - Typography</h2>
991989
}
992990
```
993991

994-
**Bonus:** If you have extra time, find an accent colour to use throughout your site and update the above color value with your accent colour. Here are the links to the color resources again.
992+
**Bonus:** If you have extra time, find an accent colour to use throughout your site and update the above color value with your accent colour. Here is the link to the [color resources slide](#slide42).
993+
994+
Or, find a background image for an upcoming afternoon exercise using one of the links below or choose one contained in your **images** folder. Here are some resources:
995+
996+
* http://superfamous.com/
997+
* http://www.gratisography.com/
998+
* http://littlevisuals.co/
999+
* http://nos.twnsnd.co/
1000+
* http://unsplash.com/
9951001
</section>
9961002

9971003
<section class="slide title" data-markdown>
@@ -1234,7 +1240,7 @@ <h3>Inline Elements</h3>
12341240
<section class="slide">
12351241
<h2>Class Exercise #5 - Horizontal navigation</h2>
12361242

1237-
<p>In this step, we're focusing on changing the default list styles to a horizontal layout. It will look like this sample below (also found in your examples folder, <a href="project/examples/exercise5-about.html">exercise 5</a>).</p>
1243+
<p>In this step, we're focusing on changing the default list styles to a horizontal layout. It will look like this sample below (also found in your examples folder, <a href="project/examples/exercise5-about.html">exercise5-about.html</a>).</p>
12381244
<img src="framework/img/workshop/exercise5-nav.png" alt="">
12391245
<p>First, remove the default list spacing and bullets.</p>
12401246
<pre><code>nav ul {
@@ -1335,7 +1341,7 @@ <h2>Class Exercise #5 - Horizontal navigation</h2>
13351341

13361342
![](framework/img/workshop/about-not-floated.png)
13371343

1338-
To get two block elements to align side-by-side, we've used `display: inline-block` but the `float` property is often used for creating page layouts.
1344+
To get two block elements to align side-by-side, we've used `display: inline-block` for our navigation list, but the `float` property is often used for creating page layouts.
13391345

13401346
**However**, we have to break the natural stacking flow when an element is floated. This will cause any element *after* the floated element to try to move up beside it or just not display properly because we've disrupted the natural stacking flow. The parent container will also collapse.
13411347
</section>
@@ -1474,7 +1480,7 @@ <h2>Class Exercise #7 - Positioning the Header &amp; Nav</h2>
14741480
</code></pre>
14751481

14761482
<p>Your page should look like <a href="project/examples/exercise7-about.html">example 7</a>. Note how the header looks the same on all three pages now.</p>
1477-
<p>Wait! Where did the footer content disappear off to on the home and contact pages!?</p>
1483+
<p>Wait! The footer content disappeared on the home and contact pages!?</p>
14781484

14791485
<div class="presenter-notes">
14801486
<p>Reinforce the ordering of CSS styles for organization during this exercise and stress the importance of keeping the styles in related groupings to keep from possibly duplicating styles or creating specificity issues.</p>
@@ -1484,13 +1490,13 @@ <h2>Class Exercise #7 - Positioning the Header &amp; Nav</h2>
14841490
<section class="slide" data-markdown>
14851491
##Home page styles
14861492

1487-
The home page and contact page currently doesn't have any content in it so the footer is just "underneath" the header.
1493+
The home page and contact page currently doesn't have any content in it so the footer is just "underneath" the header. Once content has been added, it will push the footer down the page.
14881494

14891495
However, the final design for the home page is different from the other two pages so we'll need to create special styles for the home page.
14901496

14911497
Let's use the `class` attribute to create a selector to allow us to apply specific styles just to the home page.
14921498

1493-
Add the class to the `body` tag so we can override any styles for any element contained within the entire page.
1499+
Add the `class` to the `body` tag to override any styles, for any element, contained within the entire page.
14941500

14951501
```
14961502
&lt;body class=&quot;home&quot;&gt;
@@ -1535,7 +1541,7 @@ <h2>Class Exercise #7 - Positioning the Header &amp; Nav</h2>
15351541
&lt;h1&gt;&lt;span class=&quot;highlight&quot;&gt;Jane&lt;/span&gt;Smith&lt;/h1&gt;
15361542
```
15371543

1538-
Your page should now look something like [exercise8-home](project/examples/exercise8-home.html), located in your examples folder.
1544+
Your page should now look something like [exercise8-home.html](project/examples/exercise8-home.html), located in your examples folder.
15391545
</section>
15401546

15411547
<section class="slide" data-markdown>
@@ -1692,13 +1698,13 @@ <h2>Class Exercise #10 - Contact Form</h2>
16921698
<div class="slide" data-markdown>
16931699
##Next Steps
16941700

1695-
Though we've covered a lot of material today, there are still lots of things to add to give your web page that extra personalization, finalize some styles and add some polish.
1701+
Phew! We've covered A LOT of material today.
1702+
1703+
Here are some extra challenges and take-home lessons for you to tackle another day. These lessons will cover some more options to give your web page extra personalization, finalize some styles and add some polish. Here are the links to the additional lessons:
16961704

1697-
Here are some additional lessons you can try:
1698-
1699-
* [Sticky Footer](framework/extras-sticky-footer.html)
17001705
* [Contact page](framework/extras-form-styles.html) - adding background images & form styling
17011706
* [Forms, pt 2](framework/extras-form-submission.html) - how to submit a form
1707+
* [Sticky Footer](framework/extras-sticky-footer.html)
17021708
* [Home page: additional styles](framework/extras-homepage.html) - includes using icon fonts and creating a drop down menu.
17031709
* [Add a favicon](http://blog.teamtreehouse.com/how-to-make-a-favicon)
17041710
* Use the [Font Awesome icons](http://fortawesome.github.io/Font-Awesome/) to add your social icons to the footer.

0 commit comments

Comments
 (0)