Reputation: 57
I have this footer and inside I've got a nav that I am trying to make a both top navbar and footer sidebar I would like to have them a little wider. How to achieve this?
<footer class="footer">
<div class="container" id="maincontainer">
<nav class="navbar navbar-expand-lg bg-success navbar-dark">
<a class="navbar-brand">
<i class="fas fa-car-crash"></i>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" asp-controller="home" asp-action="index">| Registered Brokers |</a>
</li>
</ul>
</div>
</nav>
</div>
Upvotes: 0
Views: 161
Reputation: 2453
The width is defined by Bootstrap's .container
. You can also replace it by .container-xl
or something similar to modify the behavior on different viewpoints. Please have a look at this table, which was retrieved from the above posted link:
To add another maximum width for large devices > 1200px
(have a look at the different media queries here), you need to add a custom class like .custom-container
and overwrite the max-width
accordingly to your wished width like this:
<div class="container custom-container" id="maincontainer">
<nav class="navbar navbar-expand-lg bg-success navbar-dark">
<a class="navbar-brand">
<i class="fas fa-car-crash"></i>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" asp-controller="home" asp-action="index">| Registered Brokers |</a>
</li>
</ul>
</div>
</nav>
</div>
@media(min-width:1200px) {
.custom-container {
max-width: 1200px !important; // Your custom value
}
}
If you always want to define the width to 100%
of the window, replace .container
by .container-fluid
.
Upvotes: 1
Reputation: 57
.container-fluid {
width: 80% !important;
}
This helped me.
Thanks to @shahryar-mohajer
Upvotes: 0