dev-resources.site
for different kinds of informations.
Footer bottom in GastbyJS
Published at
6/21/2020
Categories
gatsby
webdev
footer
beginners
Author
chrissiemhrk
Author
12 person written this
chrissiemhrk
open
I have been building my portfolio website and choose Gatsby. One problem that I encountered early on was making my footer stick at the bottom of the page. In this article, I'll be sharing how I overcame it.
Note: I used the starter kit Gatsby-starter-default as a starting point.
<div className="site-content">
<Header siteTitle={data.site.siteMetadata.title} />
<main>{children}</main>
<footer>
ยฉ {new Date().getFullYear()}, Built with
{` `}
<a href="https://www.gatsbyjs.org">Gatsby</a>
</footer>
</div>
First, in the layout.js file found in the component folder, wrap the header, main, and footer element in a div and give it a class. The class name doesn't matter.
.site-content {
display: flex;
flex-direction: column;
min-height: 100vh;
}
main {
flex: 1 0 auto;
}
Then in the layout.css file found in the same folder, write the following code. This will make your footer stick to the bottom of your page.
footer Article's
24 articles in total
Responsive Footer using React with Tailwind CSS and React Icons
read article
Comment ajouter un en-tรชte et un pied de page ร Word avec Python
read article
Understanding Word Header and Footer: Professional Advice for java developers
read article
Java-How to Add or Remove Header and Footer in Word documents
read article
๐ฅResponsive Footer Section using Flexbox | HTML CSS๐
read article
How to create header/footer (using HTML) in each page
read article
Help: Same nav and footer in the whole portfolio.
read article
HTML tags | footer
read article
[Java] Add Different Headers/Footers for Odd and Even Pages in Word
read article
Insert Header and Footer to Word using Java
read article
Keep footer at bottom of page - using flexbox
read article
Fix the footer at the bottom of your web page
read article
Footer bottom in GastbyJS
currently reading
Java add image and text header/footer to Excel
read article
Rounded Curved Footer Using Bootstrap 4
read article
Automating the Date On Your Footer.
read article
Add Header and Footer to an Existing PDF Document in Java
read article
Sticky Footer with Flexbox
read article
Sticky Footer in GatsbyJS using Flexbox
read article
Keeping the Footer at the Bottom with CSS-Grid
read article
Keeping the footer at the bottom with CSS Flexbox
read article
How to style footer semantically correct?
read article
Add Headers and Footers to Word Document in Java
read article
The curious case of the infinite page with a footer
read article
Featured ones: