I am currently designing a footer titled
<footer class="site-footer">
. This footer consists of a container <div class="container">
with 3 divisions inside it: one col-sm-12 col-md-6
, and two col-xs-6 col-md-3
. My goal is to have these 3 divisions displayed in the same block format with appropriate spacing between them.
To achieve this, I added the following CSS code:
.row{
display: flex;
}
The class row
contains these 3 divisions. The image below illustrates the layout I am aiming for: a gap between the About, Hot Offers, and Links sections while placing the social media profiles underneath on the right side.
Below is the complete code snippet for the footer:
.row {
display: flex;
}
<!-- Bootstrap 4.1.3 -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<!-- Site footer -->
<footer class="site-footer">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-6">
<h6>About</h6>
<p class="text-justify">Paragraph about us.</p>
</div>
<div class="col-xs-6 col-md-3">
<h6>Hot Offers</h6>
<ul class="footer-links">
<li><a href="#"> Offer 1 </a></li>
<li><a href="#"> Offer 2 </a></li>
<li><a href="#"> Offer 3 </a></li>
</ul>
</div>
<div class="col-xs-6 col-md-3">
<h6>Quick Links</h6>
<ul class="footer-links">
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">Refund Policy</a></li>
<li><a href="#">Sitemap</a></li>
</ul>
</div>
</div>
<hr>
</div>
<div class="container">
<div class="row">
<div class="col-md-8 col-sm-6 col-xs-12">
<p class="copyright-text">Copyright © 2021 All Rights Reserved by
<a href="#">-</a>.
</p>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<ul class="social-icons">
<li><a class="facebook" href="#"><i class="fa fa-facebook"></i></a></li>
<li><a class="twitter" href="#"><i class="fa fa-twitter"></i></a></li>
<li><a class="linkedin" href="#"><i class="fa fa-linkedin"></i></a></li>
</ul>
</div>
</div>
</div>
</footer>