Header with footer

Bootstrap 5 Header with footer component

Responsive Header with footer built with Bootstrap 5. A simple example of navigation headers with a logo. Easy to implement and customize.


Basic example

Use the navbar and footer components.

To have the same colors, just set the background color via the .bg-* class and the text color via .navbar-*(navbar) and .text-*(footer) classes.

        
            
                <!-- Navbar -->
                <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
                    <!-- Container wrapper -->
                    <div class="container-fluid">
                        <!-- Navbar brand -->
                        <a class="navbar-brand mt-2 mt-lg-0" href="#">
                            <h5 class="pt-1">MDB</h5>
                        </a>
                        <!-- Toggle button -->
                        <button class="navbar-toggler" type="button" data-mdb-collapse-init data-mdb-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                            <i class="fas fa-bars"></i>
                        </button>

                        <!-- Collapsible wrapper -->
                        <div class="collapse navbar-collapse" id="navbarSupportedContent">
                            <!-- Left links -->
                            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                                <li class="nav-item">
                                    <a class="nav-link" href="#">Dashboard</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#">Team</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#">Projects</a>
                                </li>
                            </ul>
                            <!-- Left links -->

                            <!-- Right elements -->
                            <div class="d-flex align-items-center justify-content-start">
                                <!-- Icon -->
                                <a class="text-reset me-3" href="#">
                                    <i class="fas fa-shopping-cart text-white"></i>
                                </a>

                                <!-- Notifications -->
                                <div class="dropdown">
                                    <a data-mdb-dropdown-init class="text-reset me-3 dropdown-toggle hidden-arrow" href="#" id="navbarDropdownMenuLink" role="button" data-mdb-toggle="dropdown" aria-expanded="false">
                                        <i class="fas fa-bell text-white"></i>
                                        <span class="badge rounded-pill badge-notification bg-danger">1</span>
                                    </a>
                                    <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownMenuLink">
                                        <li>
                                            <a class="dropdown-item" href="#">Some news</a>
                                        </li>
                                        <li>
                                            <a class="dropdown-item" href="#">Another news</a>
                                        </li>
                                        <li>
                                            <a class="dropdown-item" href="#">Something else here</a>
                                        </li>
                                    </ul>
                                </div>
                                <!-- Avatar -->
                                <div class="dropdown">
                                    <a data-mdb-dropdown-init class="dropdown-toggle d-flex align-items-center hidden-arrow" href="#" id="navbarDropdownMenuAvatar" role="button" data-mdb-toggle="dropdown" aria-expanded="false">
                                        <img src="https://mdbcdn.b-cdn.net/img/new/avatars/2.webp" class="rounded-circle" height="25" alt="Black and White Portrait of a Man" loading="lazy" />
                                    </a>
                                    <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownMenuAvatar">
                                        <li>
                                            <a class="dropdown-item" href="#">My profile</a>
                                        </li>
                                        <li>
                                            <a class="dropdown-item" href="#">Settings</a>
                                        </li>
                                        <li>
                                            <a class="dropdown-item" href="#">Logout</a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <!-- Right elements -->
                        </div>
                        <!-- Collapsible wrapper -->
                    </div>
                    <!-- Container wrapper -->
                </nav>
                <!-- Navbar -->

                <div style="height: 300px;"></div>

                <!-- Footer -->
                <footer class="bg-primary text-center text-white fixed-bottom">
                    <!-- Grid container -->
                    <div class="container p-4 pb-0">
                        <!-- Section: Social media -->
                        <section class="mb-4">
                            <!-- Facebook -->
                            <a data-mdb-ripple-init class="btn btn-outline-light btn-floating m-1" href="#!" role="button"><i class="fab fa-facebook-f"></i></a>

                            <!-- Twitter -->
                            <a data-mdb-ripple-init class="btn btn-outline-light btn-floating m-1" href="#!" role="button"><i class="fab fa-twitter"></i></a>

                            <!-- Google -->
                            <a data-mdb-ripple-init class="btn btn-outline-light btn-floating m-1" href="#!" role="button"><i class="fab fa-google"></i></a>

                            <!-- Instagram -->
                            <a data-mdb-ripple-init class="btn btn-outline-light btn-floating m-1" href="#!" role="button"><i class="fab fa-instagram"></i></a>

                            <!-- Linkedin -->
                            <a data-mdb-ripple-init class="btn btn-outline-light btn-floating m-1" href="#!" role="button"><i class="fab fa-linkedin-in"></i></a>

                            <!-- Github -->
                            <a data-mdb-ripple-init class="btn btn-outline-light btn-floating m-1" href="#!" role="button"><i class="fab fa-github"></i></a>
                        </section>
                        <!-- Section: Social media -->
                    </div>
                    <!-- Grid container -->

                    <!-- Copyright -->
                    <div class="text-center p-3" style="background-color: rgba(0, 0, 0, 0.2);">
                        © 2020 Copyright:
                        <a class="text-white" href="https://mdbootstrap.com/">MDBootstrap.com</a>
                    </div>
                    <!-- Copyright -->
                </footer>
                <!-- Footer -->