- 102 CSS Menu
- Table of Contents
- Related Articles
- Author
- Links
- Made with
- About a code
- Menu
- Author
- Links
- Made with
- About a code
- Fullscreen Overlay Navigation Bar
- Author
- Links
- Made with
- About a code
- Three Fancy Link Hover Effects
- Author
- Links
- Made with
- About a code
- Navigation Dotted Hover Effect
- Author
- Links
- Made with
- About a code
- Fullscreen Overlay Navigation Bar
- Author
- Links
- Made with
- About a code
- Context Menu
- Author
- Links
- Made with
- About a code
- Pure CSS Menu
- Author
- Links
- Made with
- About a code
- Neumorphism Context Menu
- Author
- Links
- Made with
- About a code
- Simple Navigation System
- Author
- Links
- Made with
- About a code
- CSS Menu
- Author
- Links
- Made with
- About a code
- Fullscreen Menu Enter
- Author
- Links
- Made with
- About a code
- Context Menu with Feather Icons
- Author
- Links
- Made with
- About a code
- CSS Hamburger Menu
- Author
- Links
- Made with
- About a code
- Text Fill on Hover
- Author
- Links
- Made with
- About a code
- List Item Hower Effect
- Author
- Links
- Made with
- About a code
- CSS-Only Marquee Effect
- Author
- Links
- Made with
- About a code
- CSS Full-Page Navigation
- Author
- Links
- Made with
- About a code
- Randomly Generated CSS Blobby Nav
- Author
- Links
- Made with
- About a code
- Full-Page Navigation
- Author
- Links
- Made with
- About a code
- Pure CSS Full Page Nav
- Author
- Links
- Made with
- About a code
- Fold Out Mobile Menu
- Author
- Links
- Made with
- About a code
- Menu Hover Fill Text
- Author
- Links
- Made with
- About a code
- Menu with Awesome Hover
- Author
- Links
- Made with
- About a code
- CSS Navigation Bar
- Author
- Links
- Made with
- About a code
- Menu Hover Underline
- Author
- Links
- Made with
- About a code
- Apple TV Menu Interface
- Author
- Links
- Made with
- About a code
- CSS Strange Nav
- Author
- Links
- Made with
- About a code
- Navbar with Pure CSS
- Author
- Links
- Made with
- About a code
- Navbar Interaction
- Author
- Links
- Made with
- About a code
- Off Canvas Menu Pure CSS
- Author
- Links
- Made with
- About a code
- Menu Bar CSS
- Author
- Links
- Made with
- About a code
- Vertical Dark Menu with CSS
- Author
- Links
- Made with
- About the code
- Moving Underline Nav Menu
- Author
- Links
- Author
- Links
- Made with
- About the code
- Navigation Menu
- Author
- Links
- Made with
- About the code
- 3D Navbar
- Author
- Links
- Made with
- About the code
- Just Another Menu
- Author
- Links
- Made with
- About the code
- Pure CSS Menu
- Author
- Links
- Made with
- About the code
- CSS Menu Feat. Emoji
- Author
- Links
- Made with
- About the code
- The Menu
- Author
- Links
- Made with
- About the code
- Menu Effect
- Author
- Links
- Made with
- About the code
- CSS-Only Nested Dropdown Navigation
- Full Page Off-Canvas Navigation
- Simple Radial Menu
- Accordion Menu
- Mobile Filter Menu
- Author
- How TO — Menu Icon
- Example
- Example
- Example Explained
- Animated Icon
- Example
- Example
- Example
- Example Explained
- How to Create a Menu Bar with Icons in CSS: A Step-by-Step Guide
- Creating a Menu Icon with HTML and CSS
- Creating a Navigation Bar with Icons
- Create a Navigation Bar with Icons
- Adding JavaScript Functionality to the Menu Icon
- Using CSS to Create Animation Effects
- Creating a Fixed Top Menu
- Other code examples for creating a menu bar with icons in CSS
102 CSS Menu
Collection of free HTML and CSS navigation menu code examples. Update of May 2020 collection. 27 new items.
Table of Contents
Related Articles
Author
Links
Made with
About a code
Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Fullscreen Overlay Navigation Bar
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Three Fancy Link Hover Effects
Transitioning clip-path and pseudo-element transform s to create smooth link hovers.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Navigation Dotted Hover Effect
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Fullscreen Overlay Navigation Bar
Fullscreen overlay navigation bar with html & css neon effect.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Context Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Pure CSS Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Neumorphism Context Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Simple Navigation System
Simple system for navigating a hierarchy in a confined space. Uses standard HTML and CSS, no JavaScript.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
CSS Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Fullscreen Menu Enter
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Context Menu with Feather Icons
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
CSS Hamburger Menu
Pure CSS menu interaction. Made using the HTML tags details and summary .
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Text Fill on Hover
Filling the text with a different color on hover — a creative text effect.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
List Item Hower Effect
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
CSS-Only Marquee Effect
A simple CSS-only marquee effect for a menu.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
CSS Full-Page Navigation
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Randomly Generated CSS Blobby Nav
A randomly generated blobby nav created with CSS. Has smooth anchor scrolling, uses backdrop-filter , and SVG filter.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Full-Page Navigation
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Pure CSS Full Page Nav
Compatible browsers: Chrome, Edge, Firefox (partial), Opera, Safari
Author
Links
Made with
About a code
Fold Out Mobile Menu
CSS only fold out mobile menu.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Menu Hover Fill Text
Menu hover fill text ( color + background-clip ).
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Menu with Awesome Hover
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: bootstrap.css, bootstrap-social.css, font-awesome.css
Author
Links
Made with
About a code
CSS Navigation Bar
Implemented a minimal navigation bar that changes color on hovering. Written using only HTML and SCSS.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Menu Hover Underline
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Apple TV Menu Interface
Compatible browsers: Chrome, Edge, Opera, Safari
Author
Links
Made with
About a code
CSS Strange Nav
Made a strange navigation. CSS only. Let’s Click!
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Navbar with Pure CSS
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Navbar Interaction
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Off Canvas Menu Pure CSS
Off canvas menu pure CSS by using only CSS.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Menu Bar CSS
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Vertical Dark Menu with CSS
Simple vertical dark menu with CSS and icons.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About the code
Moving Underline Nav Menu
Compatible browsers: Chrome, Firefox, Opera, Safari
Author
Links
Author
Links
Made with
About the code
Navigation Menu
Usable as navigation, menu or effect. It uses CSS transform and perspective to create a unique hololens-like animation effect.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About the code
3D Navbar
3D navbar in HTML and CSS.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About the code
Just Another Menu
Pure CSS floating menu animation.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About the code
Pure CSS Menu
Pure CSS menu drawer with off-click.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About the code
CSS Menu Feat. Emoji
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About the code
The Menu
Table contents style menu.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About the code
Menu Effect
Reverse text color menu effects.
Compatible browsers: Chrome, Firefox, Opera, Safari
Author
Links
Made with
About the code
CSS-Only Nested Dropdown Navigation
CSS only nested dropdown navigation with ARIA.
Full Page Off-Canvas Navigation
An example of how to build a full page navigation that exists off of the screen canvas, sliding into view when clicking the menu option. Added spice with a changing background color depending on navigation item hover.
Made by Caleb Varoga
June 17, 2016
Simple Radial Menu
HTML, CSS, JavaScript simple radial menu with social icons.
Made by Nikolay Talanov
June 13, 2016
Accordion Menu
Simple accordion menu with HTML, CSS and JavaScript.
Made by JuliaRietveld
June 8, 2016
Mobile Filter Menu
Filter menu created by Anton Aheichanka that has been converted into web version.
Made by Arjun Amgain
June 1, 2016
Author
How TO — Menu Icon
If you are not using an icon library, you can create a basic menu icon with CSS:
Animated Menu Icon (click on it):
Step 1) Add HTML:
Example
Step 2) Add CSS:
Example
Example Explained
The width and the height property specifies the width and height of each bar.
We have added a black background-color , and the top and bottom margin is used to create some distance between each bar.
Animated Icon
Use CSS and JavaScript to change the menu icon to a «cancel/remove» icon when it is clicked on:
Step 1) Add HTML:
Example
Step 2) Add CSS:
Example
.container <
display: inline-block;
cursor: pointer;
>
.bar1, .bar2, .bar3 width: 35px;
height: 5px;
background-color: #333;
margin: 6px 0;
transition: 0.4s;
>
/* Rotate first bar */
.change .bar1 transform: translate(0, 11px) rotate(-45deg);
>
/* Fade out the second bar */
.change .bar2
/* Rotate last bar */
.change .bar3 transform: translate(0, -11px) rotate(45deg);
>
Step 3) Add JavaScript:
Example
Example Explained
HTML & CSS: We use the same styles as before, only this time, we wrap a container element around each element and we specify a class name for each.
The container element is used to show a pointer symbol when the user moves the mouse over the divs (bars). When it is clicked on, it will execute a JavaScript function that adds a new class name to it, which will change the styles of each horizontal bar: the first and the last bar is transformed and rotated to the letter «x». The bar in the middle fades out and becomes invisible.
How to Create a Menu Bar with Icons in CSS: A Step-by-Step Guide
Learn how to create a stylish and functional menu bar with icons in CSS. This guide covers HTML and CSS structures, JavaScript functions, and CSS animation tools to help you create a responsive and visually appealing navigation menu.
- Creating a Menu Icon with HTML and CSS
- Creating a Navigation Bar with Icons
- Create a Navigation Bar with Icons
- Adding JavaScript Functionality to the Menu Icon
- Using CSS to Create Animation Effects
- Creating a Fixed Top Menu
- Other code examples for creating a menu bar with icons in CSS
- Conclusion
- What do you do to get a menu when clicking on an icon?
- How do I create a menu bar icon in HTML?
- How do you stick the menu on top in CSS?
As websites become more advanced and interactive, users expect a more sophisticated user interface. One way to achieve this is by creating a menu bar with icons that appears when a user clicks on a menu icon. In this article, we will explain how to create a menu bar with icons in CSS, step-by-step.
Creating a Menu Icon with HTML and CSS
The first step in creating a menu bar with icons is to create a menu icon. This can be done by using HTML and CSS. There are different HTML and CSS structures that can be used to create a menu icon, such as the tag, the tag, or the
To create a visually appealing icon, we can use different CSS properties such as color, font-size, and line-height. For example, we can create a hamburger icon by using the tag and applying the following CSS properties:
.icon color: #333; font-size: 24px; line-height: 24px; >
We can then add this icon to our HTML code:
div class="menu-icon"> i class="icon fa fa-bars">i> div>
Creating a Navigation Bar with Icons
Once we have created the menu icon, we can move on to creating the navigation bar. To create a navigation bar that only contains icons, we can use the
- and
tags. We can then apply different CSS properties to create a responsive navigation menu . For example, we can use the display property to change the layout of the navigation menu depending on the screen size:
@media screen and (max-width: 768px) .navigation display: none; > .navigation.show display: block; > >
div class="menu-icon"> i class="icon fa fa-bars">i> div> ul class="navigation"> li>a href="#">i class="fa fa-home">i>a>li> li>a href="#">i class="fa fa-user">i>a>li> li>a href="#">i class="fa fa-envelope">i>a>li> li>a href="#">i class="fa fa-bell">i>a>li> ul>
Create a Navigation Bar with Icons
In this video we’ll be creating a stylish navigation bar with icons, using plain HTML, CSS and Duration: 12:00
Adding JavaScript Functionality to the Menu Icon
To make the menu icon functional, we need to add a JavaScript function that adds a new class name to the navigation menu upon clicking the icon. We can use the addEventListener method to add a click event to the menu icon:
var menuIcon = document.querySelector('.menu-icon'); var navigation = document.querySelector('.navigation');menuIcon.addEventListener('click', function() navigation.classList.toggle('show'); >);
Using CSS to Create Animation Effects
We can further enhance the menu icon by using CSS animation tools to create a menu icon that changes appearance upon clicking. We can use the transition property to animate the icon:
.icon transition: transform 0.3s ease-in-out; > .icon.active transform: rotate(90deg); >
var menuIcon = document.querySelector('.menu-icon'); var icon = document.querySelector('.icon');menuIcon.addEventListener('click', function() icon.classList.toggle('active'); >);
Creating a Fixed Top Menu
Finally, we can use position:fixed and top:0 in CSS to create a fixed top menu. This means that the menu bar will always be visible at the top of the screen, even when the user scrolls down. To create a fixed top menu, we can add the following CSS properties to our navigation menu:
.navigation position: fixed; top: 0; width: 100%; background-color: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); >
Other code examples for creating a menu bar with icons in CSS
/*you can use the :checked or the :focus property on the icon you want the user to click and than change the display of the menu from none to whatver you want*/ #yourmenu < /*style*/ display: none; >#yourbutton < /*style*/ >#yourbutton:checked > yourmenu < display: block;/*whathever value you want*/ >/*sorry for the shitty english, hope to help someone with this concept*/