Published on

Learn How To Build A Footer With Tailwind CSS Like an Expert

Footer

What is Tailwind CSS?

Tailwind CSS is a utility-first CSS framework that focuses on creating personalized user interfaces quickly. It can gives you all the building blocks you are able to create personalized designs without having to fight to override irritating opinionated styles. Also, Tailwind CSS is a highly configurable, low-level CSS framework.

Footer

  • It can make the building process of Footer ui component faster and more easily.
  • Enables building complex responsive layouts and components freely.
  • Minimum lines of CSS code in Footer component file.

Free download of the Footer's source code

<link rel="stylesheet" href="https://demos.creative-tim.com/notus-js/assets/styles/tailwind.css">
<link rel="stylesheet" href="https://demos.creative-tim.com/notus-js/assets/vendor/@fortawesome/fontawesome-free/css/all.min.css">

<footer class="relative bg-blueGray-200 pt-8 pb-6">
  <div class="container mx-auto px-4">
    <div class="flex flex-wrap text-left lg:text-left">
      <div class="w-full lg:w-6/12 px-4">
        <h4 class="text-3xl fonat-semibold text-blueGray-700">Let's keep in touch!</h4>
        <h5 class="text-lg mt-0 mb-2 text-blueGray-600">
          Find us on any of these platforms, we respond 1-2 business days.
        </h5>
        <div class="mt-6 lg:mb-0 mb-6">
          <button class="bg-white text-lightBlue-400 shadow-lg font-normal h-10 w-10 items-center justify-center align-center rounded-full outline-none focus:outline-none mr-2" type="button">
            <i class="fab fa-twitter"></i></button><button class="bg-white text-lightBlue-600 shadow-lg font-normal h-10 w-10 items-center justify-center align-center rounded-full outline-none focus:outline-none mr-2" type="button">
            <i class="fab fa-facebook-square"></i></button><button class="bg-white text-pink-400 shadow-lg font-normal h-10 w-10 items-center justify-center align-center rounded-full outline-none focus:outline-none mr-2" type="button">
            <i class="fab fa-dribbble"></i></button><button class="bg-white text-blueGray-800 shadow-lg font-normal h-10 w-10 items-center justify-center align-center rounded-full outline-none focus:outline-none mr-2" type="button">
            <i class="fab fa-github"></i>
          </button>
        </div>
      </div>
      <div class="w-full lg:w-6/12 px-4">
        <div class="flex flex-wrap items-top mb-6">
          <div class="w-full lg:w-4/12 px-4 ml-auto">
            <span class="block uppercase text-blueGray-500 text-sm font-semibold mb-2">Useful Links</span>
            <ul class="list-unstyled">
              <li>
                <a class="text-blueGray-600 hover:text-blueGray-800 font-semibold block pb-2 text-sm" href="https://www.creative-tim.com/presentation?ref=njs-profile">About Us</a>
              </li>
              <li>
                <a class="text-blueGray-600 hover:text-blueGray-800 font-semibold block pb-2 text-sm" href="https://blog.creative-tim.com?ref=njs-profile">Blog</a>
              </li>
              <li>
                <a class="text-blueGray-600 hover:text-blueGray-800 font-semibold block pb-2 text-sm" href="https://www.github.com/creativetimofficial?ref=njs-profile">Github</a>
              </li>
              <li>
                <a class="text-blueGray-600 hover:text-blueGray-800 font-semibold block pb-2 text-sm" href="https://www.creative-tim.com/bootstrap-themes/free?ref=njs-profile">Free Products</a>
              </li>
            </ul>
          </div>
          <div class="w-full lg:w-4/12 px-4">
            <span class="block uppercase text-blueGray-500 text-sm font-semibold mb-2">Other Resources</span>
            <ul class="list-unstyled">
              <li>
                <a class="text-blueGray-600 hover:text-blueGray-800 font-semibold block pb-2 text-sm" href="https://github.com/creativetimofficial/notus-js/blob/main/LICENSE.md?ref=njs-profile">MIT License</a>
              </li>
              <li>
                <a class="text-blueGray-600 hover:text-blueGray-800 font-semibold block pb-2 text-sm" href="https://creative-tim.com/terms?ref=njs-profile">Terms &amp; Conditions</a>
              </li>
              <li>
                <a class="text-blueGray-600 hover:text-blueGray-800 font-semibold block pb-2 text-sm" href="https://creative-tim.com/privacy?ref=njs-profile">Privacy Policy</a>
              </li>
              <li>
                <a class="text-blueGray-600 hover:text-blueGray-800 font-semibold block pb-2 text-sm" href="https://creative-tim.com/contact-us?ref=njs-profile">Contact Us</a>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </div>
    <hr class="my-6 border-blueGray-300">
    <div class="flex flex-wrap items-center md:justify-between justify-center">
      <div class="w-full md:w-4/12 px-4 mx-auto text-center">
        <div class="text-sm text-blueGray-500 font-semibold py-1">
          Copyright © <span id="get-current-year">2021</span><a href="https://www.creative-tim.com/product/notus-js" class="text-blueGray-500 hover:text-gray-800" target="_blank"> Notus JS by
          <a href="https://www.creative-tim.com?ref=njs-profile" class="text-blueGray-500 hover:text-blueGray-800">Creative Tim</a>.
        </div>
      </div>
    </div>
  </div>
</footer>

Install tailwind css of verion 2.2.4

Use the script html tag to import the script of Tailwind CSS of the version 2.2.4

<script src="https://cdn.tailwindcss.com"></script>
  • relative
  • bg-blueGray-200
  • pt-8
  • pb-6
  • mx-auto
  • px-4
  • flex
  • flex-wrap
  • text-left
  • lg:text-left
  • w-full
  • lg:w-6/12
  • text-3xl
  • text-blueGray-700
  • text-lg
  • mt-0
  • mb-2
  • text-blueGray-600
  • mt-6
  • lg:mb-0
  • mb-6
  • bg-white
  • text-lightBlue-400
  • h-10
  • w-10
  • mr-2
  • text-lightBlue-600
  • text-pink-400
  • text-blueGray-800
  • lg:w-4/12
  • ml-auto
  • block
  • text-blueGray-500
  • text-sm
  • hover:text-blueGray-800
  • pb-2
  • my-6
  • border-blueGray-300
  • md:w-4/12
  • text-center
  • py-1
  • hover:text-gray-800
  1. Use relative to position an element according to the normal flow of the document.

  2. Control the background color of an element to blueGray-200 using the bg-blueGray-200 utilities.

  3. Control the padding on top side of an element to 2rem using the pt-8 utilities.

  4. Control the padding on bottom side of an element to 1.5rem using the pb-6 utilities.

  5. Control the horizontal margin of an element to auto using the mx-auto utilities.

  6. Control the horizontal padding of an element to 1rem using the px-4 utilities.

  7. Use flex to create a block-level flex container.

  8. Use flex to create a block-level flex container.

  9. Control the text color of an element to left using the text-left utilities.

  10. Control the text color of an element to left at only large screen sizes using the lg:text-left utilities.

  11. Use w-full to set an element to a 100% based width.

  12. Use lg:w-6/12 to set an element to a fixed width(6/12) at only large screen sizes.

  13. Control the text color of an element to 3xl using the text-3xl utilities.

  14. Control the text color of an element to blueGray-700 using the text-blueGray-700 utilities.

  15. Control the text color of an element to lg using the text-lg utilities.

  16. Control the margin on top side of an element to 0rem using the mt-0 utilities.

  17. Control the margin on bottom side of an element to 0.5rem using the mb-2 utilities.

  18. Control the text color of an element to blueGray-600 using the text-blueGray-600 utilities.

  19. Control the margin on top side of an element to 1.5rem using the mt-6 utilities.

  20. Control the margin on bottom side of an element to 0rem at only large screen sizes using the lg:mb-0 utilities.

  21. Control the margin on bottom side of an element to 1.5rem using the mb-6 utilities.

  22. Control the background color of an element to white using the bg-white utilities.

  23. Control the text color of an element to lightBlue-400 using the text-lightBlue-400 utilities.

  24. Use h-10 to set an element to a fixed height(2.5rem).

  25. Use w-10 to set an element to a fixed width(2.5rem).

  26. Control the margin on right side of an element to 0.5rem using the mr-2 utilities.

  27. Control the text color of an element to lightBlue-600 using the text-lightBlue-600 utilities.

  28. Control the text color of an element to pink-400 using the text-pink-400 utilities.

  29. Control the text color of an element to blueGray-800 using the text-blueGray-800 utilities.

  30. Use lg:w-4/12 to set an element to a fixed width(4/12) at only large screen sizes.

  31. Control the margin on left side of an element to auto using the ml-auto utilities.

  32. Use inline utilities to put the element on its own line and fill its parent.

  33. Control the text color of an element to blueGray-500 using the text-blueGray-500 utilities.

  34. Control the text color of an element to sm using the text-sm utilities.

  35. Control the text color of an element to blueGray-800 on hover using the hover:text-blueGray-800 utilities.

  36. Control the padding on bottom side of an element to 0.5rem using the pb-2 utilities.

  37. Control the vertical margin of an element to 1.5rem using the my-6 utilities.

  38. Control the border color of an element to blueGray-300 using the border-blueGray-300 utilities.

  39. Use md:w-4/12 to set an element to a fixed width(4/12) at only medium screen sizes.

  40. Control the text color of an element to center using the text-center utilities.

  41. Control the vertical padding of an element to 0.25rem using the py-1 utilities.

  42. Control the text color of an element to gray-800 on hover using the hover:text-gray-800 utilities.

Conclusion

The above is a step-by-step tutorial on how to use Tailwind CSS to make a Footer components, learn and follow along to implement your own components.