I'm trying to remove the border and round corner from the nav-bar.
.navbar-default {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
But it does not work, any ideas?
HTML,
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Brand</a>
</div>
<ul class="nav navbar-nav">
<li><a href="#">Home</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Shop</a></li>
<li><a href="#">About</a></li>
</ul>
</div>
</nav>
Try adding .navbar-static-top in your nav class
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-7s5uDGW3AHqw6xtJmNNtr+OBRJUlgkNJEo78P4b0yRw= sha512-nNo+yCHEyn0smMxSswnf/OnX6/KwJuZTlNZBjauKhTK0c+zT+q5JOCx0UFhXQ6rJR9jg6Es8gPuD2uZcYDLqSw==" crossorigin="anonymous">
<nav class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Brand</a>
</div>
<ul class="nav navbar-nav">
<li><a href="#">Home</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Shop</a></li>
<li><a href="#">About</a></li>
</ul>
</div>
</nav>
".navbar-default" is not cause. To remove the border and round corner from the nav-bar, You should try it:
.navbar {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
This is usually when ur css is loaded before bootstrap css and is getting overwritten. Make sure ur css is defined after bootstrap.
Your code is fine. Have a look at this JSFiddle.
https://jsfiddle.net/0h8muuc3/2/
.navbar-default{
border: none;
border-radius: 0;
}
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Brand</a>
</div>
<ul class="nav navbar-nav">
<li><a href="#">Home</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Shop</a></li>
<li><a href="#">About</a></li>
</ul>
</div>
</nav>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With