Skip to content

Commit 2289b82

Browse files
committed
footer fixed on bottom
1 parent e288a82 commit 2289b82

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

Wireframe/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ <h2>What is a README file?</h2>
2121
A README is the front door of any software project — the first document a visitor reads when they encounter your code.
2222
</p>
2323
<p class="content">
24-
Typically named README.md and written in Markdown, it lives at the root of a repository and renders automatically on platforms like GitHub. Its core purpose is to answer three questions immediately: what does this project do, how do I get it running, and how do I use it?<br>A well-crafted README...
24+
Typically named README.md and written in Markdown, it lives at the root
25+
of a repository and renders automatically on platforms like GitHub. Its core
26+
purpose is to answer three questions immediately: what does this project do,
27+
how do I get it running, and how do I use it?<br>A well-crafted README...
2528
</p>
2629
<a href="https://en.wikipedia.org/wiki/README" target="_blank">Read more</a>
2730
</article>

Wireframe/style.css

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
/* ====== Design Palette ======
33
This is our "design palette".
4-
It sets out the colours, fonts, styles etc to be used in this design
4+
It sets out the colours, fonts, styles etc to be used in this design
55
At work, a designer will give these to you based on the corporate brand, but while you are learning
66
You can design it yourself if you like
77
Inspect the starter design with Devtools
@@ -40,7 +40,7 @@ svg {
4040
width: 100%;
4141
object-fit: cover;
4242
}
43-
/* ====== Site Layout ======
43+
/* ====== Site Layout ======
4444
Setting the overall rules for page regions
4545
https://www.w3.org/WAI/tutorials/page-structure/regions/
4646
*/
@@ -51,7 +51,10 @@ main {
5151
footer {
5252
position: fixed;
5353
bottom: 0;
54+
left: 0;
55+
width: 100%;
5456
text-align: center;
57+
padding-bottom: var(--space);
5558
}
5659
/* ====== Articles Grid Layout ====
5760
Setting the rules for how articles are placed in the main element.
@@ -68,8 +71,8 @@ main {
6871
grid-column: span 2;
6972
}
7073
}
71-
/* ====== Article Layout ======
72-
Setting the rules for how elements are placed in the article.
74+
/* ====== Article Layout ======
75+
Setting the rules for how elements are placed in the article.
7376
Now laying out just the INSIDE of the repeated card/article design.
7477
Keeping things orderly and separate is the key to good, simple CSS.
7578
*/
@@ -85,7 +88,7 @@ article {
8588
> img {
8689
grid-column: span 3;
8790
}
88-
91+
8992
.intro {
9093
font-size: 1em;
9194
font-weight: bold;
@@ -96,9 +99,3 @@ article {
9699
opacity: 0.8;
97100
}
98101
}
99-
footer {
100-
padding-bottom: var(--space);
101-
position: relative;
102-
bottom: 0;
103-
width: 100%;
104-
}

0 commit comments

Comments
 (0)