Menu made in Bootstrap

Asked

Viewed 1,119 times

4

Centering a menu made in Pingendo Bootstrap?

<html>
  <head>
    <meta charset="utf-8">
    <title>Boletim Online</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link href="http://netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
    <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
    <script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
  </head>

  <body draggable="true">
    <div class="navbar navbar-default navbar-static-top navbar-inverse">
      <div class="container">
        <div class="navbar-header">
          <a type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"></a>
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <a class="navbar-brand" href="index.php" draggable="true">Administrador</a>
        </div>
        <div class="collapse navbar-collapse navbar-ex1-collapse">
          <ul class="nav navbar-nav navbar-left">
            <li>
              <a href="cadastroturmas.php">Turmas</a>
            </li>
          </ul>
        </div>
      </div>
    </div>
</body>
</html>
  • put the code of how is your header or something so we can help you better

  • Please use more details in your question, so we can understand what you use and what you need to do and we would also like to know what you have tried.

1 answer

2

Adjust the css as described here that I believe will solve your problem:

<ul class="nav navbar-nav nav-center">
    <li>
        <a href="cadastroturmas.php">Turmas</a>
    </li>
.navbar{
    padding : 0 25px;
}

.nav-center{
    position: relative;
    left: 30%;
}

http://jsfiddle.net/kwvLm6tg/2/

Important with percentage to maintain responsiveness.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.