I'm currently working on a project website right now and is a one-page website, and I'm new at Bootstrap 3 so I'm still using some start-up templates. The issue I'm having trouble right now is that I don't know how to put an effective but complicated hamburger menu that the client wants:
- when the user is on the home page or the header/carousel, the hamburger menu alone should be on a transparent nav background on the upper right of the screen (not on the edge).
- this header hamburger menu from the header should hide or just be fixed upside when you scroll down a bit.
- when you scroll down AFTER the header, the intended black nav bar should appear, fixed on top, which should extend the small navbar earlier and then become a full screen 100% width bar with the hamburger menu on the right side and company logo on the left side.
- when the hamburger menu is clicked, a navigation box on the right side of the screen should appear.
This is my HTML:
<a id="menu-toggle" href="#" class="btn btn-primary btn-lg toggle"><i class="fa fa-bars"></i></a>
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<a id="menu-close" href="#" class="btn btn-default btn-lg pull-right toggle"><i class="fa fa-times"></i></a>
<li class="sidebar-brand">Navigation</a></li>
<li><a href="#top">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#services">Works</a></li>
<li><a href="#portfolio">People</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div>
I'm currently using a Bootstrap 3 standard template because I wanted to learn more about it before moving to 4. This is my CSS:
.btn {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: normal;
line-height: 1.428571429;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
.btn-primary {
color: #fff;
background-color: #428bca;
border-color: #357ebd;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
color: #fff;
background-color: #3276b1;
border-color: #285e8e;
}
.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
background-image: none;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #428bca;
border-color: #357ebd;
}
.btn-primary .badge {
color: #428bca;
background-color: #fff;
}
This is all I'm working with right now for the menu. I would have wanted to create new classes for those stuff so I won't rely on the Bootstrap template and I can edit it asap without messing all up.