O
O
OlegGazmanov2020-05-09 10:38:50
css
OlegGazmanov, 2020-05-09 10:38:50

How to center footer content?

Can't center nav content. It only aligns if I wrap the nav in a div, but the div covers some of the content.

<div class="container">
    <div class="row">
        <div class="col-lg-12">
            <nav class="navbar fixed-bottom navbar-light bg-light">
                <div class="text-center">
                    <h1 class="text-center">Hello niggers</h1>
                </div>
            </nav>
        </div>
    </div>
</div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
n1ksON, 2020-05-09
@OlegGazmanov

.container, .row, .col-lg-12, .navbar {
    width: 100%;
    text-align: center;
}

Or
.navbar {
    width: 100%;
    display: flex;
    justify-content: center;
}

Well, as a last resort, but it’s better not to do this, because the validator swears
<div class="container">
    <div class="row">
        <div class="col-lg-12">
            <nav class="navbar fixed-bottom navbar-light bg-light">
                <center><h1 class="text-center">Hello niggers</h1></center>
            </nav>
        </div>
    </div>
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question