Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove "nav-tabs" rounded corners (Bootstrap)

Don't know how to remove the rounded corner on tabs (class="nab-tabs") in Bootstrap.

Example: http://i.imgur.com/ho7rX.png

Please Help

Thanks

like image 335
user1946565 Avatar asked Jan 03 '13 19:01

user1946565


2 Answers

Add this line to the CSS

.nav-tabs > li > a {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}

or in your case:

.nab-tabs > li > a {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}

EDIT: 21-03-2018

there is another way in BS4.0 add rounded-0 the official bootstrap override, here is the working example:

<div class="container">
  <div class="row">
    <div class="col-8 ml-auto mr-auto my-5 ">
      <ul class="nav nav-tabs ">
        <li class="nav-item ">
          <a class="nav-link active rounded-0" href="#">Active</a>
        </li>
        <li class="nav-item">
          <a class="nav-link rounded-0" href="#">Link</a>
        </li>
        <li class="nav-item">
          <a class="nav-link rounded-0" href="#">Link</a>
        </li>
        <li class="nav-item">
          <a class="nav-link rounded-0 disabled" href="#">Disabled</a>
        </li>
      </ul>
    </div>
  </div>
</div>
like image 68
Ignacio Correia Avatar answered Oct 26 '22 04:10

Ignacio Correia


For Bootstrap 4 you can use .nav-tabs-nostyle. For example:

<nav class="navbar navbar-fixed-top navbar-light bg-faded">
  <div class="nav navbar-nav nav-tabs-nostyle">
    <a href="#one" class="nav-item nav-link" data-toggle="tab">One</a>
    <a href="#two" class="nav-item nav-link" data-toggle="tab">Two</a>
    <a href="#three" class="nav-item nav-link" data-toggle="tab">Three</a>
  </div>
</nav>
like image 27
Archonic Avatar answered Oct 26 '22 02:10

Archonic