Skip to content

Commit 959070c

Browse files
Home page exercise updates.
1 parent e7e01e9 commit 959070c

3 files changed

Lines changed: 16 additions & 17 deletions

File tree

index.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,9 +1585,7 @@ <h2>Class Exercise - Positioning the Header &amp; Nav</h2>
15851585

15861586
The final design for the home page is different from the other two pages including the order of the HTML. On **index.html**, the nav HTML comes *before* the header. The nav didn't disappear, it's just *under* the header.
15871587

1588-
If the header wasn't set to be fixed to the top of the page, it would stack underneath the nav.
1589-
1590-
For the home page, we can use a **class** attribute to override the styles that are shared between the About and Contact page and apply specific styles needed for the home page.
1588+
For the Home page, we can add a **class** attribute to override the styles that are shared between the About and Contact page. This class will allow us to use a more specific selector to apply specific styles just for the home page.
15911589

15921590
Let's add a class to the `body` tag so we can override any styles for any element contained within the page.
15931591

@@ -1596,17 +1594,17 @@ <h2>Class Exercise - Positioning the Header &amp; Nav</h2>
15961594
```
15971595
</section>
15981596
<section class="slide" data-markdown>
1599-
##Exercise #7 - Homepage Header & Nav
1597+
##Class Exercise #7 - Homepage Header & Nav
16001598

1601-
Override the header styles not needed for the home page.
1599+
These are the styles we are going to change to update the home page.
16021600

16031601
* remove the fixed positioning
16041602
* remove the white background colour
16051603
* remove the border bottom
16061604
* center align the text
16071605
* push the heading down from the top of the page
16081606

1609-
We'll use the new `home` class we created to override the styles by using a more specific selector.
1607+
We'll use the new `home` class we created to override the styles by using a more *specific* selector.
16101608

16111609
```
16121610
.home header {
@@ -1627,6 +1625,12 @@ <h2>Class Exercise - Positioning the Header &amp; Nav</h2>
16271625
font-size: 40px;
16281626
}
16291627
```
1628+
1629+
Add the `.highlight` class to your first name again, to match the styles on the other pages.
1630+
1631+
```xml
1632+
&lt;h1&gt;&lt;span class=&quot;highlight&quot;&gt;Jane&lt;/span&gt;Smith&lt;/h1&gt;
1633+
```
16301634

16311635
Your page should now look something like [example 7](project/examples/exercise7-home.html), located in your examples folder.
16321636
</section>

project/examples/css/exercise6.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,3 @@ nav a {
101101
}
102102

103103

104-
/* FOOTER
105-
-----------------------------------------*/
106-
footer {
107-
clear: both;
108-
}
109-

project/examples/css/exercise7.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,13 @@ nav a {
112112
width: 50%;
113113
margin-right: 20px;
114114
}
115-
116-
117-
/* FOOTER
118-
-----------------------------------------*/
119-
footer {
115+
.quote {
120116
clear: both;
117+
text-align: center;
118+
padding-top: 20px;
121119
}
122120

123121

122+
123+
124+

0 commit comments

Comments
 (0)