How to make a drop-down menu?

Many select on different sites drop-down menus. This menu makes your site more functional, and more intuitive to the network user who visited it. About how to make a drop-down menu, our article will tell.

Joomla

  • You need to go to the Control Panel site, then in the "Menu", then in the "Extensions", then in the "Manager modules";
  • Now you need to find the module that is responsible for the Site Menu. It can also be in the "Module Manager" (a plugin that is responsible for displaying the menu on this site);
  • Next, you need to click on the module and perform these settings:
    • "Enabled" - "Yes";
    • "Always show embedded sub-items" - "Yes";
    • "Activate parent" - "Yes";
    • "Open the menu" - "Yes";
  • Save the setting;
  • Then you need to go to "All menus", then "Menu" and select the menu in the list where the item with dropdown sub-items will be created;
  • Click the "Create" button;
  • Now you need to make menu items and then sub-items, for which you need to select materials, that is, a category template (for example, an external link);
  • Next, you need to enter the name of this menu andset the settings, the main one of which is "Parent element" - the menu item, from which different sub-items will drop out, that's why you need to select the main menu item as the parent element.
  • Then you need to specify the category to which the link of your sub-item will be and save the setting

Here's how to make a pull-down menu for Joomla. If you want to make several such items, then you need to do the above steps several times.

HTML and CSS

  • First you need to create a menu and defineits structure. Then you need to arrange the elements in a user-friendly manner and think about the correct and understandable names of future sections. Now it remains to determine those items that will be drop-down, and the necessary sub-points that will be in these points;
  • Next, you need to draw the selected structure using html-tags. It looks something like this:
    • <ul>
      <li> <a href="#"> Your reference # 1 </a> </ li>
    • <li> <a href="#"> Your link # 2 </a>
      • <ul>
        <li> <a href="#"> Your item number 2-1 </a> </ li>
      • <li> <a href="#"> Your item number 2-2 </a> </ li>
      • <li> <a href="#"> Your item number 2-3 </a> </ li>
        </ ul> </ li>
    • <li> <a href="#"> Your reference # 3 </a>
      • <ul>
        <li> <a href="#"> Your Item # 3-1 </a> </ li>
      • <li> <a href="#"> Your item number 3-2 </a> </ li>
      • <li> <a href="#"> Your Item # 3-3 </a> </ li>
      • <li> <a href="#"> Your item number 3-4 </a> </ li>
        </ ul> </ li>
    • </ ul>
  • Then you need to put all your menus in the block,designated and set the identifier (). This will allow you to assign your features exclusively to this block, without touching other blocks. In the identifier, you must specify a name whose properties you describe in the next steps;
  • Now you need to create lists, in which is the list itself, • is each its line, and add for future links what will be created by the drop-down menu, a list with the appropriate sub-items;
  • Next, you need to turn the names of these items into links, enclosing them in, and assign it to the "href-address" parameter of the desired page specified by the link. Here's how html to make a drop-down menu;
  • Now you need to set the properties of the desired list using css. To do this, you need to add them to the css file as follows:
    • #vmenu ul {padding: 0px; margin: 0px; width: 250px; list-style: none;},
  • where "padding" is an indentation inside (it must be"0"), "margin" is an indent from the outside (should be "0"), "list-style" is a list style (you can set the value to "none" to remove points), width is the width of the list;
  • Then you need to add the properties of the element: #vmenu ul li {position: relative;} is the parameter of the required positioning (position of the elements is "position"), "relative" is the value necessary to determine the location of the drop-down menu relative to the start menu. This menu will be vertical;
  • Next, you need to specify the properties of the list that is located in the item of another list:
    • #vmenu li ul {position: absolute; display: none; top: 0; left: 250px; },
  • where "position: absolute "is the absolute placement of the submenu relative to the menu," left "and" top "is the location by indentation from the left and from the top," display: none is the display parameter (initially the list will not be visible);
  • Now you need to enter the parameters for your links:
    • #vmenu ul li a {padding: 5px; display: block; color: # 606060; text-decoration: none; background: # d8d8d8;},
  • where "display:block "is a display parameter that makes an element in the form of a block," padding "is an indent," color "is the color of the link (text)," background "is the color of the link (background)," text-decoration "is the style of your link (in this case, the underscore is removed);
  • Then you need to set the action in case of hovering the cursor:
    • #vmenu li: hover ul {display: block;},
  • where - "li" is the line of the list, "ul" is the list that will be visible. Here's how to make the drop-down menu css;
  • You can also add parameters such as the image parameter or colors for the background, the font of the links themselves, horizontal features and many other properties for the menu view.

Now you know how to make a drop-down menu in many ways and you can choose the most suitable one!

Related news

How to make a drop-down menu

How to make a drop-down menu

How to make a drop-down menu

How to make a drop-down menu

How to make a drop-down menu

How to make a drop-down menu

How to make a drop-down menu

How to make a drop-down menu

How to make a drop-down menu

How to make a drop-down menu

How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu How to make a drop-down menu