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
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1585,9 +1585,7 @@ <h2>Class Exercise - Positioning the Header & Nav</h2>
1585
1585
1586
1586
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.
1587
1587
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.
1591
1589
1592
1590
Let's add a class to the `body` tag so we can override any styles for any element contained within the page.
1593
1591
@@ -1596,17 +1594,17 @@ <h2>Class Exercise - Positioning the Header & Nav</h2>
1596
1594
```
1597
1595
</section>
1598
1596
<sectionclass="slide" data-markdown>
1599
-
##Exercise #7 - Homepage Header & Nav
1597
+
##Class Exercise #7 - Homepage Header & Nav
1600
1598
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.
1602
1600
1603
1601
* remove the fixed positioning
1604
1602
* remove the white background colour
1605
1603
* remove the border bottom
1606
1604
* center align the text
1607
1605
* push the heading down from the top of the page
1608
1606
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.
1610
1608
1611
1609
```
1612
1610
.home header {
@@ -1627,6 +1625,12 @@ <h2>Class Exercise - Positioning the Header & Nav</h2>
1627
1625
font-size: 40px;
1628
1626
}
1629
1627
```
1628
+
1629
+
Add the `.highlight` class to your first name again, to match the styles on the other pages.
0 commit comments