"nav-bar"
Bootstrap 3.0.0 Snippet by evarevirus

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <header> <div class="header-container"> <a href="#" > <img class="logo" src="https://maxbernard.design/img/SmackjaxLogo.png" alt="mine logo ess this" > </a> <nav class="main-menu"> <a class="menu-button" href="#">Welcome</a> <div class="dropdown-wrapper menu-button"> <a class="menu-button" href="#">About me</a> <div class="drop-menu fade-in effect"> <a class="menu-button" href="#">A man</a> <a class="menu-button" href="#">A plan</a> <a class="menu-button" href="#">Panama</a> </div> </div> <div class="dropdown-wrapper menu-button"> <a class="menu-button" href="#" >Portfolio</a> <div class="drop-menu scissor effect"> <a class="menu-button" href="#">This</a> <a class="menu-button" href="#">Is</a> <a class="menu-button" href="#">An</a> <a class="menu-button" href="#">Extremely</a> <a class="menu-button" href="#">Long</a> <a class="menu-button" href="#">Dropdown</a> </div> </div> <div class="dropdown-wrapper menu-button"> <a class="menu-button" href="#" >Contact</a> <div class="drop-menu"> <a class="menu-button" href="#">Complaints</a> <a class="menu-button" href="#">Praise</a> <a class="menu-button" href="#">Threats</a> </div> </div> </nav> </div> </header>
/* ========================================== RESET ===========================================*/ * { box-sizing: border-box; list-style-type: none; padding: 0; margin: 0; text-decoration: none; } /*==================================== BASE STYLES ====================================*/ body { background: #333; } * { font-family: 'Vollkorn', Arial, serif; font-size: 1em; } /*==================================== HEADER STYLES ====================================*/ header { background: #e9e9e9; box-shadow: 0px -3px 15px 2px; } .header-container { width: 100%; margin: auto; display: flex; flex-direction: column; /* Logo starts stacked on top of nav */ align-items: center; } .logo { max-width: 120px; max-height: 120px; margin-top: 10px; } /*==================================== MENU STYLES ====================================*/ .main-menu { width: 100%; display: flex; flex-direction: column; justify-content: space-between; margin-top: 25px; /* Space for logo */ overflow: visible; max-width: 700px; /* Keeps the buttons getting too far from each other on largest screens */ } .main-menu a { width: 100%; text-align: center; padding: .75em 1em; display: block; color: #222; border-bottom: 2px solid #ddd; } .main-menu a:hover { color: #c14400; border-bottom-color: #c14400; } /*==================================== DROPDOWN MENU STYLES ====================================*/ /* The hidden-at-first drop menus */ .drop-menu { display: flex; flex-direction: column; /* This never changes */ align-items: center; width: 100%; /* Allows sub buttons to stretch across button width in main-menu*/ transition: max-height .4s, opacity .3s; max-height: 0; opacity: 0; overflow: hidden; /* Keeps links in drop menu from displaying until height is large enough */ } .drop-menu > .menu-button { height: 100%; transition: transform .4s; transform: translateY(-300%); background: #aaa; /* Makes the menu effects visible on close */ } /* Makes for easy identifying when the drop menu is open */ .dropdown-wrapper:hover > .menu-button { color: #c14400; background: #333; } /* The dropdown-wrapper wraps both the .main-menu button and drop down menu */ /* Expands .drop-menu to children height, not setting an expicit height allows variable # of buttons */ .dropdown-wrapper:hover .drop-menu{ max-height: 300px; opacity: 1; } /* The specifity keeps styles from affecting main menu button */ .dropdown-wrapper:hover > .drop-menu .menu-button { transform: translateY(0%); } /*==================================== MEDIA QUERIES ====================================*/ @media (min-width: 550px) { /*==================================== DROP-MENU EFFECTS (LARGER SCREENS) ====================================*/ /* Resets dropdown styles to not affect the effects. Overflow still set to hidden allows for menu effects like sliding in */ .effect { transition: max-height 0s; opacity: 1; background: transparent; } .effect .menu-button { transform: translateY(0%); } .scissor .menu-button{ transform: translateX(-100%); } /* Selects every other menu button to slide the opposite way */ .scissor .menu-button:nth-child(2n+1) { transform: translateX(100%); } .dropdown-wrapper:hover .scissor .menu-button { transform: translateX(0%); } .fade-in .menu-button { transition: opacity .5s; opacity: 0; } .dropdown-wrapper:hover .fade-in .menu-button { opacity: 1; } .header-container { width: 90%; } .header-container { height: 200px; justify-content: space-between; /* Pushes logo to top, nav bar all the way down */ } .main-menu { flex-direction: row; /* Horizontal main menu buttons */ align-items: flex-start; /* Makes the top of the 'dropdown-wrapper' div stay flush with button top because it's aligned on the cross-axis */ height: 48px; /* Setting the height allows the dropdown outside of it's parent's bounds, therefore not compensated for by the flex. */ margin: 0; } .main-menu > .menu-button { width: 23%; max-width: 150px; } .logo { max-width: 130px; max-height: 130px; margin-top: 15px; } } @media (min-width: 850px) { .header-container { flex-direction: row; /* Places logo on the same line as .main-menu */ justify-content: space-around; height: 160px; } .main-menu { width: 60%; justify-content: space-between; } .logo { margin: 0; } }

Related: See More


Questions / Comments: