Navbar in bootstrap is not fixed-top or justifies text to the right

0

I am using the bootstrap 4.0 version and I have made a navigation bar, but I want the nav-links or elements on the right and the bar is fixed top, I have tried anyway but it does not work.

the code:

<nav class="navbar fixed-top navbar-expand-lg ">


            <img src="imagenes/logopeque.png" class="d-sm-none"> 
       <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> 
             <span class="navbar-toggler-icon"><i class="fas fa-align-right"> </i></span>
             </button>
        <div class="navbar-header">

             <a class="navbar-brand d-none d-md-block" href="#"><img src="imagenes/logo.png"><img src="imagenes/texto.png"> </a>
                  </div>



        <div class="container">
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse justify-content-end" id="navbarNav">
          <ul class="nav-navbar ml-auto">
            <li class="nav-item active"><a class="nav-link" href="#">&ensp;&ensp;INICIO</a></li>
            <li class="nav-item"><a class="nav-link" href="#">&ensp;&ensp;¿QUIENES SOMOS?</a></li>
            <li class="nav-item dropdown">
             <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" id="navbarDropdownMenuLink" aria-haspopup="true" aria-expanded="false">&ensp;&ensp;SERVICIOS <b class="caret"></b></a>
              <ul class="dropdown-menu" id="dropdown">
                <li class="nav-item" id="thisone"><a href="#" class="nav-linksito"> &ensp;ction</a></li>
                <li class="nav-item" id="thisone"><a href="#" class="nav-linksito"> &ensp;nother action</a></li>
                  <li class="nav-item" id="thisone"><a href="#" class="nav-linksito"> &ensp;ction</a></li>
                <li class="nav-item" id="thisone"><a href="#" class="nav-linksito"> &ensp;nother action</a></li>

              </ul>
            </li>
            <li class="nav-item"><a class="nav-link" href="#"> &ensp;&ensp;EVENTOS </a></li>
            <li class="nav-item"><a class="nav-link" href="#">&ensp;&ensp;CONTACTO </a></li>
          </ul>


        </div>
    </div>
        <!-- /.navbar-collapse -->

      <!-- /.container-fluid -->
    </nav>

my css:

nav{
    background-color::#232323 !important;

}

.navbar-toggler{
    background-color:#2B2BF5 !important;
}
.navbar-toggler-icon{
    color:orange !important;
    top:6px !important;
}
.nav-link{
    font-family: 'Bree Serif',serif !important;
    color:white !important;
    font-size:16px !important;
    }
.nav-link:hover{
    color:#FF8552 !important;
}
.nav-linksito{
    font-family:'Bree Serif', serif !important;
    color:white !important;
    font-size:16px !important;
}
.nav-linksito:hover{
    text-decoration:none !important;
    color:#2b2bf5 !important;
}

Could someone guide me?

    
asked by Angel Gomez 30.06.2018 в 23:09
source

1 answer

0

See if the Bootstrap property does not work for you

Try giving direct to CSS

nav {position: fixed! important;}

With that will be fixed top, I hope you serve, greetings

    
answered by 03.07.2018 / 03:20
source