-->

How TO - More Button in Navbar

0

Learn how to create a "more" button.


"More" Button in Navbar




Try it Yourself »


Create A Dropdown Navbar

Create a dropdown menu that appears when the user moves the mouse over an element inside a navigation bar.

Step 1) Add HTML:

Example

<div class="navbar">
  <a href="#home">Home</a>
  <a href="#news">News</a>
  <div class="dropdown">
    <button class="dropbtn">More
      <i class="fa fa-caret-down"></i>
    </button>
    <div class="dropdown-content">
      <a href="#">Link 1</a>
      <a href="#">Link 2</a>
      <a href="#">Link 3</a>
    </div>
  </div>
</div>

Example Explained

Use any element to open the dropdown menu, e.g. a <button>, <a> or <p> element.

Use a container element (like <div>) to create the dropdown menu and add the dropdown links inside it.

Wrap a <div> element around the button and the <div> to position the dropdown menu correctly with CSS.


Post a Comment

0Comments

123

Post a Comment (0)