FooterTutorials

How to create a Footer with Flexbox

How to create a Footer with Flexbox

Before We Start

Every developer needs clean and modern elements to develop their websites, It contains pictures and a user interface element within a website. The most important one and the first section that the user sees when the user enters a website. How to create a Footer with Flexbox

So if you are a person who wishes to develop a website, you have to know how to create that properly.

We are here to solve your problem. In this article we discuss how to create these elements. Before we start please read the below articles which easier you to understand the process, if you are new to development.

Step 1 – Add HTML

It’s too easy and simple. Just copy and paste below code in your HTML editor between <body> </body> tag.

<footer>
  <nav class="footer-inner">
    <section class="footer-item">
      <h1>LOGO</h1>

      <h2>We create possibilities <br>for the connected world.<br><b class="color">Be Bold.</b></h2>
    </section>
  
    <section class="footer-item">
      <h3>Explore</h3>
        <ul>
          <li><a href="#">Home</a></li>
          <li><a href="#">About</a></li>
          <li><a href="#">Capabilities</a></li>
          <li><a href="#">Careers</a></li>
        </ul>
    </section>
    
    <section class="footer-item">
      <h3>Visit</h3>
        <a href="#">
        <p>Envoy So. California</p>
        <p>34 Tesla, Ste 100</p>
        <p>Irvine, Ca, USA 92618</p>
        </a>
      
      <h3 class="desktop">New Business</h3>
        <p class="desktop"><a href="#">engage@weareenvoy.com</a></p>
        <p class="desktop"><a href="#">949.333.3106</a></p>
    </section>
    
    <section class="footer-item">
      <h3>New Business</h3>
        <p><a href="#">Email us</a></p>
        <p><a href="#">949.333.3106</a></p>
    </section>
  
    <section class="footer-item">
      <h3>Follow</h3>
        <ul>
          <li><a href="#">Instagram</a></li>
          <li><a href="#">Twitter</a></li>
          <li><a href="#">LinkedIn</a></li>
        </ul>
    </section>
  
    <section class="footer-item">
      <h3>Legal</h3>
        <ul>
          <li><a href="#">Terms</a></li>
          <li><a href="#">Privacy</a></li>
        </ul>
    </section>
    
    <section class="footer-item">
      <a href="#" class="footer-button">Next: About</a>
    </section>
  </nav>
</footer>

Step 2 – Add CSS

Copy and paste below code in your HTML editor between <style></style> tag.

<style>
footer {
  background-color: black;
  font-family: "Lato", sans-serif;
  padding: 85px 0 100px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: flex-start;
  width: 90%;
  max-width: 1170px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 120px;
  position: relative;
}

.footer-item {
  margin: 0 7.2% 0 0;
}

.footer-item:nth-of-type(4) {
  display: none;
}

.footer-item:nth-of-type(7) {
  margin-left: auto;
  margin-right: 0 !important;
}

.footer-button {
  color: white;
  position: relative;
  font-weight: 400;
  font-size: 16px;
  transition: 1s;
  transition-delay: .2s;
  padding: 14px;
}

.footer-button:after {
  content: "";
  position: absolute;
  top: 45px;
  right: 13px;
  background-color: white;
  height: 1px;
  width: 86px;
  transition: .6s;
}

.footer-button:hover {
  color: black;
  background-color: white;
}

.footer-button:hover:after {
  width: 112px;
  right: 0px;
}

h1 {
  font-weight: 900;
  color: white;
  font-size: 24px;
  letter-spacing: 2px;
  margin: 0;
  padding-bottom: 10px;
}

h2 {
  font-weight: 300;
  line-height: 1.8;
  font-size: 13px;
  color: #d1d1d1;
  letter-spacing: 0.03em;
  padding: 15px 0 0 0;
}

.color {
  color: white;
  font-weight: 400;
}

h3 {
  font-weight: 400;
  font-size: 13px;
  color: white;
  margin: 0;
  padding-bottom: 9px;
  letter-spacing: 0.03em;
}

h3.desktop {
  padding-top: 30px;
}

ul {
  line-height: 1.8;
  list-style-type: none;
  padding: 0;
}

li {
  font-weight: 300;
  font-size: 13px;
  color: #d1d1d1;
  letter-spacing: 0.03em;
}

p {
  font-weight: 300;
  font-size: 13px;
  padding: 0;
  line-height: 1.8;
  letter-spacing: 0.03em;
}

a {
  text-decoration: none;
  color: #d1d1d1;
}

a:hover {
  color: white;
}

.desktop {
  display: auto;
}

.footer-inner:after {
  content: "© 2020 Envoy. All Rights Reserved.";
  font-weight: 300;
  letter-spacing: 0.03em;
  font-size: 13px;
  color: #d1d1d1;
  position: absolute;
  top: 260px;
}

@media (max-width: 1024px) {
  
footer {
  padding: 50px 0 60px 0 !important;
}
  
.footer-inner {
  margin-bottom: 55px !important;
  border-bottom: 1px solid #333;
  padding-bottom: 55px;
}
  
.footer-item {
  margin: 0 0 45px 0 !important;
  flex: calc(100% / 2);
}
  
.footer-item:nth-of-type(1) {
  padding-right: 0 !important;
  flex-basis: 100%;
  border-bottom: 1px solid #333;
  padding-bottom: 32px;
}

.footer-item:nth-of-type(4) {
  display: block;
}
  
.footer-item:nth-of-type(7) {
  margin: 0 0 0 -13px !important;
  padding: 20px 0 0 0 !important;
  flex-basis: 100%;
}
  
.desktop {
  display: none;
}

.footer-inner:after {
  top: 745px !important;
}
}
</style>

At the end we will have something like this. You can change fonts, colors, backgrounds and all things that you want. Enjoy it.

Your Output

How to create a Footer with Flexbox

Video Tutorial

Please watch this video to better understand this tutorial and don’t forget to subscribe to our channel.


Help others to find out about this article on Social Media sites. If you have any doubt or any problem, don’t hesitate to contact us. Thereafter we will be able to help you and also make sure you bookmark our site on your browser.

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button