[Bootstrap] Pomoc oko navbar

Započeo LoOdaK, Mart 17, 2017, 20:13:24 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Pa ovako nesto ja kobajagi poceo pravit za skolu neku str, ali ocu i malo bootstrap-a ubacit, ubacio sam navbar ali postoji li mogucnost da taj text centriram na sredinu navbar-a  ??
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!



evo ti primjer
Ako si mislio na ovo

HTML

<nav class="navbar navbar-default" role="navigation">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">Brand Logo</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="pull-left"><a href="#">Dashboard</a></li>
        <li class="active"><a href="#">Stories</a></li>
        <li><a href="#">Videos</a></li>
        <li><a href="#">Photos</a></li>
        <li class="social pull-right"><a href="#">Social Links</a></li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>


CSS

  .navbar-nav {
    width: 100%;
    text-align: center;
    > li {
      float: none;
      display: inline-block;
    }
  }

 View" style="width:1200px;height:228px;

Ne radi brt ovo evo ti kod pa vidi sta ne valja ja sam botara za ovo

[pawn].navbar-text {
            width: 100%;
            text-align: center;
            }
        </style>
        <nav class="navbar navbar-default">
          <div class="container-fluid">
            <div class="navbar-header">
                <p class="navbar-text">BOT SAM</p>
            </div>
          </div>[/pawn]
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!



Osim sto nisi otvorio <style> tag 'BOT SAM' stoji na sredini stranice.

<div class="container"> umesto container-fluid, to ce ti staviti content nesto kao na fazon kod facebooka, ti mozes onda dodati nesto u fazonu class="pull-right" da ga povuces jos desno
Poslednja Izmena: Mart 22, 2017, 21:26:09 POSLE PODNE od Cadilab

Ja mislim da ti ovo treba :)


<nav class="navbar navbar-default" role="navigation">
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-center">
<li><a href="#">Text</a></li>
<li><a href="#">Text</a></li>
<li><a href="#">Text</a></li>
</ul>
</div>
</nav>


CSS:

@media (min-width: 768px) {
.navbar-nav.navbar-center {
   position: absolute;
   left: 50%;
   transform: translatex(-50%);
  }
}