Togglable And Expandable Side Menu With Pure CSS

no-js-menu is a pure CSS side menu where you can expand submenu items on mouseover. Expandable, interchangeable navigation menu with a single-string hamburger JavaScript.

Responsive Animated 3D Hamburger Menu with CSS/CSS3

How to make use of it:

1. Create a hidden checkbox to control the position of the menu.

<input type="checkbox" id="menu-button">

2. Create a label associated with the hidden checkbox.

<label for="menu-button" class="menu-button--label">&#9636;</label>

3. Create a side menu with the following html structure.

<div class="menu-wrap">
  <div class="side-menu">
    <ul class="side-menu--list">
    
        <li>
            <a class="subset">Company</a>
            <a href="">Mission</a>
            <a href="">People</a>
            <a href="">Social Responsibility</a>
        </li>
        <li>
            <a class="subset" href="">Products</a>
            <a href="">Solar panels</a>
            <a href="">Electronics</a>
            <a href="">Utilizers</a>
        </li>
        <li>
            <a class="subset" href="">Contacts</a>
            <a href="">Staff</a>
            <a href="">Contact</a>
            <a href="">Media</a>
        </li>

    </ul>

  </div>
</div>

4. CSS/CSS3 Basic Rules for Expanded Side Menu.

/*We are fixing a menu and pulling them out of the screen by negative 'left'*/


.side-menu {
  padding: 0;
  margin: 0;
  font-size: 0;
  position: fixed;
  left: -120px;
  top: 100px;
  opacity: .95;
  overflow: hidden;
  -webkit-transition: all .3s ease-in-out;
  transition: all .3s ease-in-out;
}

/*We need to hide the default input box*/


#menu-button { display: none; }

/*if checkbox is checked next sibling's .side menu child slides in*/


#menu-button:checked + .menu-wrap .side-menu { left: 0px; }

/*this is the label for the checkbox which act as a button for our menu*/


.menu-button--label {
  color: black;
  position: fixed;
  top: 50px;
  left: 10px;
  font-size: 3rem;
  text-align: center;
  line-height: 0;
  cursor: pointer;
  -webkit-transition: all 1s;
  transition: all 1s;
}

/*Fancy rotation effect for our menu button. It rotates back when mouse leaves it */


.menu-button--label:hover {
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
  -webkit-transition: all 1s;
  transition: all 1s;
}

/*We are giving the li item a shorter width to activate 'pop-out' effect when you hover*/


.side-menu--list li {
  font-size: 0;
  width: 110px;
}

.side-menu--list a {
  color: #fff;
  display: block;
  text-decoration: none;
  height: 2rem;
  line-height: 2rem;
  background: #333;
  padding-left: 1rem;
  width: 180px;
  font-size: 1.2rem;
}

.side-menu--list {
  list-style: none;
  padding-left: 0;
}

/*.subset is a sub-menu that we are styling to stand out a bit*/


.side-menu--list li a.subset {
  font-size: 1.4rem;
  height: 2.2rem;
  line-height: 2.2rem;
 padding-left: .5rem;
  background: #222;
}

/*Applying overflow:hidden to get rid of the cluttering when the height is minimized*/


.side-menu--list li {
  height: 2.2rem;
  overflow: hidden;
  -webkit-transition: all .4s ease-in-out;
  transition: all .4s ease-in-out;
}

/*when you hover a li it expands to show all the menu links(and expands itself only)*/


.side-menu--list li:hover {
  height: 8.2rem;
  -webkit-transition: all .4s ease-in-out;
  transition: all .4s ease-in-out;
  cursor: pointer;
  width: 180px;
}

/*We are skipping a sub-menu link and applying transformation to the follow-ups*/


.side-menu--list li a:not(:first-child):hover {
  cursor: pointer;
  background-color: #fff;
  color: #333;
  -webkit-transition: all .3s ease-in-out;
  transition: all .3s ease-in-out;
  -webkit-transform: translateX(10px);
  transform: translateX(10px);
}

 

sliding navigation menu


See Demo And Download

Official Website(tomkallen): Click Here

This superior jQuery/javascript plugin is developed by tomkallen. For extra Advanced Usage, please go to the official website.

Related Posts

VenoBox-Responsive-jQuery-Lightbox-Plugin

Responsive Image Gallery Lightbox jQuery Plugin | VenoBox

VenoBox is a responsive jQuery modal window plugin suitable for images, embedded content, iFrames, Google Maps, Vimeo, and YouTube videos. The big difference compared to many other…

bootstrap-dropdown-on-hover

[Animation] Bootstrap Multi-Level Responsive Dropdown Menu

Bootstrap-based multi-level dropdown navigation menu with cool animations. The dropdown on Hover is a jQuery plugin used to create Bootstrap multi-level scroll-triggered dropdown menus with CSS3 animations…

Google-Translate-Dropdown-Customize-With-Country-Flag

Google Translate Dropdown Customize With Country Flag | GT API

Flag google translates jQuery text that takes advantage of the Google Cloud Translation API to translate web content between languages by selecting a country from the dropdown…

Bootstrap-Fileinput

HTML 5 File Input Optimized for Bootstrap 4.x./3.x with File Preview | Bootstrap Fileinput

bootstrap-fileinput is an improved HTML 5 file input  Bootstrap 5.x, 4.x and 3.x with file preview for different files, provides multiple selections, resumable section uploads, and more….

HStack-and-VStack-in-CSS

CSS Layout Components Horizontal/Vertical Stack | HStack and VStack

HStack and VStack in CSS – CSS layout components that (basically) stack anything horizontally and vertically. A pure CSS library that makes it easy to stack elements…

Floating-Whatsapp-Chat-Button

How to Add Floating Whatsapp Chat Button In HTML | venom-button

Venom Button is a very simple plugin for the jQuery floating WhatsApp button. Adds a floating button to your site that calls WhatsApp Click to Chat API. It will automatically start the WhatsApp…

Leave a Reply

Your email address will not be published. Required fields are marked *