How to Align navbar logo to the left screen using Bootstrap ?

It is very easy in Bootstrap to align items left and right by using the bootstrap classes. By default, it sets to left. If you want to align items center or right then it will be done by yourself. To align the navbar logo to the left of the screen with the Bootstrap method is a quick trick that can save you from writing extra CSS. In this, we simply add another div tag above the div tag having class navbar navbar-expand-lg navbar-light bg-light fixed-top py-lg-0.






<!DOCTYPE html>
        How to Align navbar logo to the 
        left screen using Bootstrap ?
    <link href=
            rel="stylesheet" integrity=
    <script src="" integrity=
    <script src=
    <!-- NAVBAR STARTING -->
    <!-- Use navbar class to the navbar logo 
        to the far left of the screen-->
    <nav class=" navbar navbar-expand-lg 
        navbar-light bg-light fixed-top py-lg-0 ">
        <a class="navbar-brand" href="#">
            <!-- Add logo with size of 90*80 -->
            <img src=
            width="90" height="80" alt="">
        <button class="navbar-toggler" type="button"
                aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
        <div class="collapse navbar-collapse"
            <ul class="navbar-nav ml-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="#">Home
                        <span class="sr-only">(current)</span>
                <li class="nav-item">
                    <a class="nav-link" href="#">About</a>
                <li class="nav-item">
                    <a class="nav-link" href="#">Courses</a>
                <li class="nav-item">
                    <a class="nav-link" href="#">Contact</a>




My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.