Skip to content

Commit 859158f

Browse files
updated example files for sticky footer
1 parent 44ad6d8 commit 859158f

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

project/examples/css/exercise8.css renamed to project/examples/css/sticky-footer.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,25 @@ nav a {
118118
-----------------------------------------*/
119119
footer {
120120
clear: both;
121+
padding: 5px;
122+
}
123+
footer p {
124+
margin: 0; /* removes default margin */
121125
}
122-
123126
/* sticky footer */
124127
html, body {
125128
height: 100%;
126129
}
127130
.page-wrap {
128131
min-height: 100%;
129-
margin-bottom: -35px; /* equal to footer height */
132+
margin-bottom: -35px; /* must be the same height as footer */
130133
}
131134
.page-wrap:after {
132135
content: "";
133136
display: block;
134137
}
135138
footer, .page-wrap:after {
136-
height: 35px; /* must be the same height as footer */
139+
height: 35px; /* However tall you want the footer to be. */
137140
}
138141
footer {
139142
background: #222;

project/examples/exercise8-about.html renamed to project/examples/sticky-footer-about.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<title>Jane Smith | About Me</title>
66
<link href='http://fonts.googleapis.com/css?family=Nixie+One|Open+Sans:300|Pacifico' rel='stylesheet' type='text/css'>
7-
<link rel="stylesheet" href="css/exercise8.css">
7+
<link rel="stylesheet" href="css/sticky-footer.css">
88
</head>
99
<body>
1010

@@ -15,9 +15,9 @@ <h2>Web Developer + City Girl</h2>
1515

1616
<nav>
1717
<ul>
18-
<li><a href="exercise8-home.html">Home</a></li>
19-
<li><a href="exercise8-about.html">About</a></li>
20-
<li><a href="exercise8-contact.html">Contact</a></li>
18+
<li><a href="sticky-footer-home.html">Home</a></li>
19+
<li><a href="sticky-footer-about.html">About</a></li>
20+
<li><a href="sticky-footer-contact.html">Contact</a></li>
2121
</ul>
2222
</nav>
2323
</header>

project/examples/exercise8-contact.html renamed to project/examples/sticky-footer-contact.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<title>Jane Smith | Contact Me</title>
66
<link href='http://fonts.googleapis.com/css?family=Nixie+One|Open+Sans:300|Pacifico' rel='stylesheet' type='text/css'>
7-
<link rel="stylesheet" href="css/exercise8.css">
7+
<link rel="stylesheet" href="css/sticky-footer.css">
88
</head>
99
<body>
1010

@@ -15,9 +15,9 @@ <h2>Web Developer + City Girl</h2>
1515

1616
<nav>
1717
<ul>
18-
<li><a href="exercise8-home.html">Home</a></li>
19-
<li><a href="exercise8-about.html">About</a></li>
20-
<li><a href="exercise8-contact.html">Contact</a></li>
18+
<li><a href="sticky-footer-home.html">Home</a></li>
19+
<li><a href="sticky-footer-about.html">About</a></li>
20+
<li><a href="sticky-footer-contact.html">Contact</a></li>
2121
</ul>
2222
</nav>
2323
</header>

project/examples/exercise8-home.html renamed to project/examples/sticky-footer-home.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
<meta charset="UTF-8">
55
<title>Jane Smith</title>
66
<link href='http://fonts.googleapis.com/css?family=Nixie+One|Open+Sans:300|Pacifico' rel='stylesheet' type='text/css'>
7-
<link rel="stylesheet" href="css/exercise8.css">
7+
<link rel="stylesheet" href="css/sticky-footer.css">
88
</head>
99
<body class="home">
1010

1111
<div class="page-wrap">
1212
<nav>
1313
<ul>
14-
<li><a href="exercise8-home.html">Home</a></li>
15-
<li><a href="exercise8-about.html">About</a></li>
16-
<li><a href="exercise8-contact.html">Contact</a></li>
14+
<li><a href="sticky-footer-home.html">Home</a></li>
15+
<li><a href="sticky-footer-about.html">About</a></li>
16+
<li><a href="sticky-footer-contact.html">Contact</a></li>
1717
</ul>
1818
</nav>
1919

0 commit comments

Comments
 (0)