When I toggle the button to show the menu on small screens, the menu overflows the parent div with id=contents instead of pushing it down. How can this issue be fixed?
Here is the code:
<body>
<nav id="header" class="navbar navbar-default">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navmenu" aria-expanded="false">
<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="#"><img id="logo" src="images/art-of-hair.png"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div id="navmenu" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="#">Home<span class="sr-only">Home</span></a></li>
<li><a href="#">Hair<br>Styles</a></li>
<li class=""><a href="#" class="">About</a></li>
<li class=""><a href="#" class="">Contact</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div id="contents">
<div class="jumbotron">
<h4>We bring out your beauty...</h4>
<h6>Set an appointment</h6>
<p><a class="btn btn-lg" href="tel:5671234009" role="button"><span class="glyphicon glyphicon-earphone"></span>567-1234-009</a></p>
</div> <!-- End Jumbotron -->
<div id="featured">
</div> <!-- #featured -->
</div> <!-- #contents -->
<div id="footer">
</div> <!-- #footer -->
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- <script src="js/main.js"></script> -->
</body>
and here is the CSS:
/** {
margin: 0;
}*/
body {
font-family: 'Alice', serif;
}
/****************** Nav Section ************************/
nav#header {
background:url('../images/header.png') no-repeat;
/*min-height:200px;*/
color:#fff;
margin-bottom:0;
}
#logo {
width: 300px;
height:150px;
}
#navmenu {
margin:0px 120px 0 0;
color: #fff;
}
ul.nav.navbar-nav.navbar-right li {
background-color: #301b14;
height:180px;
font-weight: bold;
text-transform: uppercase;
margin:10px;
border-radius: 5px;
text-align: center;
}
ul.nav.navbar-nav.navbar-right li a {
color: #fff;
font-weight: bold;
text-transform: uppercase;
position: relative;
top: 35%;
left: 0;
padding-top: 5px;
}
ul.nav.navbar-nav.navbar-right li.active {
color: #301b14;
background-color: #e4dfc1;
border-radius: 5px;
}
ul.nav.navbar-nav.navbar-right li.active a {
color: #301b14;
background-color: #e4dfc1;
border-radius: 5px;
}
ul.nav.navbar-nav.navbar-right li:hover {
color: #301b14;
background-color: #e4dfc1;
border-radius: 5px;
}
ul.nav.navbar-nav.navbar-right li a:hover {
color: #301b14;
background-color: #e4dfc1;
border-radius: 5px;
}
/****************** End Nav Section ************************/
/****************** Content Section ************************/
.jumbotron {
letter-spacing: 2px;
background: url('../images/jumbo-1000.jpeg') no-repeat center;
height:559px;
margin:0;
border-top: 10px solid rgba(48,27,20,0.9);
border-bottom: 10px solid rgba(48,27,20,0.9);
}
etc...