Foundation CSS Responsive Navigation Menu
Last Updated :
09 Mar, 2022
Foundation CSS is an open-source & responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing & can be accessible to any device. It is used by many companies such as Facebook, eBay, Mozilla, Adobe, and even Disney. The framework is built on Saas-like bootstrap. It is more sophisticated, flexible, and easily customizable. It also comes with CLI, so it’s easy to use it with module bundlers. It offers the Fastclick.js tool for faster rendering on mobile devices.
The Responsive navigation menu in Foundation CSS is a navigation bar for websites and applications whose size changes according to screen size.
Foundation CSS Responsive Navigation Menu Classes:
- dropdown: These classes are used to create a dropdown for elements in the top bar.
- vertical: These classes are used to create a vertical navigation menu.
Syntax:
<ul class="menu Navigation-Menu-Classes">
....
</ul>
Example 1:
HTML
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css" />
<script src=
"https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.min.js">
</script>
<script src=
"https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/vendor/jquery.min.js">
</script>
<script src=
"https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.js">
</script>
</head>
<body>
<h1 style="color: green">GeeksforGeeks</h1>
<h3>Responsive Navigation menu</h3>
<ul class="menu dropdown"
data-responsive-menu="drilldown medium-dropdown">
<li>
<a href="#">Bike</a>
<ul class="menu">
<li><a href="#">Bajaj</a></li>
<li><a href="#">Suzuki</a></li>
<li>
<a href="#">Honda</a>
<ul class="menu">
<li><a href="#">Activa</a></li>
<li><a href="#">Dio</a></li>
<li><a href="#">Passion</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#">Car</a></li>
<li><a href="#">Service</a></li>
<li><a href="#">Contact</a></li>
</ul>
<script>
$(document).ready(function () {
$(document).foundation();
});
</script>
</body>
</html>
Output:
Foundation CSS Responsive Navigation Menu
Example 2:
HTML
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css" />
<script src=
"https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.min.js">
</script>
<script src=
"https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/vendor/jquery.min.js">
</script>
<script src=
"https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.js">
</script>
</head>
<body style="padding: 10px">
<h1 style="color: green">GeeksforGeeks</h1>
<h3>Responsive Vertical Menu</h3>
<ul class="menu vertical">
<li>
<a href="#">Home</a>
</li>
<li>
<a href="#">About</a>
</li>
<li>
<a href="#">Service</a>
</li>
<li>
<a href="#">Contact</a>
</li>
</ul>
<script>
$(document).ready(function () {
$(document).foundation();
});
</script>
</body>
</html>
Output:
Foundation CSS Responsive Navigation Menu
Reference: https://get.foundation/sites/docs/responsive-navigation.html
Similar Reads
Foundation CSS Responsive Navigation Foundation CSS is an open-source & responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing & can be accessible to any device. It is used by many companies such as Facebook, eBay,
4 min read
Foundation CSS Responsive Navigation Toggle Foundation CSS is an open-source & responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing & can be accessible to any device. It is used by many companies such as Facebook, eBay,
3 min read
Foundation CSS Menu Sticky Navigation Foundation CSS is an Open-source front-end framework that makes it simple and quick to build stunning, responsive websites, mobile apps, and emails. September of that year saw ZURB publish it. Many companies, including Facebook, eBay, Mozilla, Adobe, and even Disney, use it. Based on the Bootstrap f
7 min read
Foundation CSS Magellan Navigation Foundation CSS is an open-source front-end framework that is used to create stunning responsive websites, emails, or apps quickly and easily. ZURB released it in September 2011. Numerous businesses, like Facebook, eBay, Mozilla, Adobe, and even Disney, use it. This platform, which resembles SaaS, is
9 min read
Foundation CSS Sticky Navigation Foundation CSS is a free and open-source front-end framework that aids in the creation of flexible web designs. It's one of the most powerful CSS frameworks, and it works across all devices, delivering a responsive grid as well as HTML and CSS UI components, templates, and more. It also includes som
5 min read