How To Create a More Button in a Navigation Bar using CSS? Last Updated : 24 May, 2024 Comments Improve Suggest changes Like Article Like Report Adding a More button in a navigation bar is used to handle overflow items when there is insufficient space to display all navigation links. We will explore how to implement a More button using CSS. ApproachCreate a web page structure using the <nav> element, which contains list items for each navigation link.Include a list item for the "More" button that contains another list for the dropdown content.Set list-style: none to remove default list styles, and apply padding: 0 and margin: 0 to remove default spacing. Apply display: flex to the navigation bar to display items in a row.By default, hide the dropdown content by setting display: none.Use the :hover pseudo-class to show the dropdown content when the More button is hovered over.Example: The example below shows how to create a More Button in a Navigation Bar using CSS. HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> body { padding: 0; margin: 0; background-color: whitesmoke; } .nav-bar { list-style: none; padding: 0; margin: 0; display: flex; background-color: rgb(28, 160, 28); } .nav-bar li { position: relative; } .nav-bar a { text-decoration: none; padding: 10px; display: block; color: white; font-size: larger; } .dropdown-content { display: none; position: absolute; top: 100%; width: 130%; left: 0; list-style: none; padding: 0; margin: 0; background-color: white; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); } .dropdown:hover .dropdown-content { display: block; } .dropdown-content li a { color: black; padding: 10px; display: block; text-decoration: none; } .dropdown-content li a:hover { background-color: rgb(202, 241, 202); } </style> </head> <body> <nav> <ul class="nav-bar"> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#l">Services</a></li> <li class="dropdown"> <a href="#">Moreâ–¼</a> <ul class="dropdown-content"> <li><a href="#">Products</a></li> <li><a href="#">Portfolio</a></li> <li><a href="#">Blog</a></li> </ul> </li> </ul> </nav> </body> </html> Output: Output Comment More infoAdvertise with us Next Article How To Create a More Button in a Navigation Bar using CSS? yuvrajghule281 Follow Improve Article Tags : Web Technologies CSS Similar Reads How to create a top navigation bar using CSS? A top navigation bar is a horizontal bar that typically contains links to different sections of a website. It is a fundamental part of a website's layout and helps users navigate easily. In this article, we will explore different approaches to creating a top navigation bar using CSS. These are the f 3 min read How to create a split navigation bar using CSS ? The article will demonstrate how to create a split navigation bar using CSS. There are two ways to make the split navigation bar these are with the help of flexbox properties and CSS position property. A split navigation bar is a popular layout where navigation links are divided into two sections. I 4 min read Create A Bottom Navigation Menu using HTML and CSS This article will show you how to create a bottom navigation menu using HTML and CSS. The navigation menu is an essential component in modern web design. It allows users to navigate through a website easily. Here, we use HTML to create the structure of the Bottom Navigation menu, and CSS add styles 2 min read How to Create Neon Light Button using HTML and CSS? The neon light button animation effect can be easily created by using HTML and CSS. By using HTML, we will design the basic structure of the button and then by using the CSS, we can create the neon light animation effect. HTML code: In this section, we will design a simple button structure using anc 2 min read How to create Vertical Navigation Bar using HTML and CSS ? After reading this article, you will be able to build your own vertical navigation bar. To follow this article you only need some basic understanding of HTML and CSS. Let us start writing our vertical navigation bar, first, we will write the structure of the navigation bar. In this tutorial, we crea 3 min read Like