How to display a navbar from a particular section of the page?

0

In the project I am doing, when the viewport is less than 767px it will display a menu / navbar however, it should only be displayed after a certain section of the page.

I made an example in Fiddle, there it is better explained.

Section 1 - Does not display

Section 2 (Onwards) - Displays.

Example

HTML:

<nav class="navbar navbar-default navbar-fixed-bottom visible-xs">   <div class="container-fluid"> 

    <div class="navbar-header">
         <!-- <a class="navbar-brand" href="#">LOGO PSTCH</a> </div> -->


    <div class="collapse navbar-collapse visible-xs" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
       <li><a  href="#" data-toggle="modal" data-target="#myModal1" data-direction="bottom"> About</a></li>
       <li><a  href="#" data-toggle="modal" data-target="#myModal2" data-direction='bottom'> Sobre </a></li>
       <li><a  href="#" data-toggle="modal" data-target="#myModal3" data-direction='bottom'> Contact </a></li>


      </ul>    
    </div>
    </div>     </div>  </nav>

 <div id="logo"> 

            <center>
                            <a href="#desce" class="page-scroll  btn btn-xl">SECTION 1</a>
            </center>   </div>

  <div id="content">

    <p> SECTION 2  </p>

      <p> The navbar will appear here down/hereafter!</p>   </div>

CSS:

    html, body {
    height:100%;
    padding:0;
    margin:0;

}






#logo{
            background: black;
            width: 100%;
            height: 100%;          


}

#content {
        border: 1px solid black;
        width: 100%;
        height: 50%;
}

.navbar .nav  li{
    float:none;
    display:inline-block;
    *display:inline; /* Internet Explorer 7 compatibility */
    *zoom:1;
    vertical-align: bottom;

}


.navbar .navbar-collapse {
  text-align: center;
}
    
asked by anonymous 13.12.2015 / 03:05

1 answer

0

Maybe you can apply a margin of 100vh (100vh = the whole screen). Vh divides your screen into 100 parts, if you put margin-top: 100vh, it will pick up the entire screen regardless of the resolution.

    
04.01.2016 / 13:45