Jump to content

Custom Drop-down Menu

Recommended Posts

Just a reminder that this works ONLY with IPS Default theme.
It does not work with custom themes!

Log into you AdminCP, go to Themes > Default > Edit HTML & CSS.
Type in the search box "Navbar" and locate

{template="navBarItems" app="core" group="global" location="front" params="\IPS\core\FrontNavigation::i()->roots( $preview ), \IPS\core\FrontNavigation::i()->subBars( $preview ), 0, $preview"}

After you located it, put this code below it and save it.

<div class="dropdown">
  <button class="dropbtn">Menu <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>
    <a href="#">Link 4</a>
 <style> /* Dropdown Button */
.dropbtn {
  background-color: #1265a1; /*You can change this color, it's blue by default.*/
  color: white;
  padding: 16px;
  font-size: 16px;
  border: none;

/* The container <div> - needed to position the dropdown content */
.dropdown {
  position: relative;
  display: inline-block;

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;

/* Links inside the dropdown */
.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;

/* Change color of dropdown links on hover */
.dropdown-content a:hover {background-color: #ddd;}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {display: block;}

/* Change the background color of the dropdown button when the dropdown content is shown */
   .dropdown:hover .dropbtn {background-color: #1265a1;}</style> 



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...