Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Foundation CSS Responsive Navigation Menu

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </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

Foundation CSS Responsive Navigation Menu

Example 2:

HTML




<!DOCTYPE html>
<html>
  
<head>
    <link rel="stylesheet"
          href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </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

Foundation CSS Responsive Navigation Menu

Reference: https://get.foundation/sites/docs/responsive-navigation.html


My Personal Notes arrow_drop_up
Last Updated : 09 Mar, 2022
Like Article
Save Article
Similar Reads
Related Tutorials