title: How to centralize nav tabs/pills in Booststrap 4?
body: <p>I'd like to centralize some tabs on a nav in Bootstrap 4, but nothing seems to work. Also, I couldn't manage to shorten the line under the tabs, I would be really grateful if You could give me some hints about that too. Thanks in advance.</p>
  
  <p>My code :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.nav-tabs&gt;li,
  .nav-pills&gt;li {
    float: none;
    display: inline-block;
    *display: inline;
    /* ie7 fix */
    zoom: 1;
    /* hasLayout ie7 trigger */
  }
  
  .nav-tabs,
  .nav-pills {
    text-align: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  
  &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
    &lt;title&gt;Registration&lt;/title&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;link rel="stylesheet" type="text/css" href="stylesheets/asd.css"&gt;
    &lt;link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap.css"&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"&gt;
    &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
    &lt;ul class="nav nav-tabs"&gt;
      &lt;li class="nav-item"&gt;&lt;a data-toggle="tab" class="nav-link active" href="#student"&gt;Student&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a data-toggle="tab" class="nav-link" href="#teacher"&gt;Teacher&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any suggestions ?</p>