aaliyah aaliyah - 1 year ago 114
HTML Question

Toggle a menu of Anchors

I´m learning how to code and I have a problem.
I have createng an anchor that works like a button but I want to slide down a menu when I click that button. How can I manage that? What do I have to write on the HTML part for the menu?
Thank you for helping

Answer Source

Try going for a framework like Bootstrap.

<div class="dropdown">
  <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Dropdown Example
  <span class="caret"></span></button>
  <ul class="dropdown-menu">
    <li><a href="#">HTML</a></li>
    <li><a href="#">CSS</a></li>
    <li><a href="#">JavaScript</a></li>

Refer this page for clarity - http://www.w3schools.com/bootstrap/bootstrap_dropdowns.asp

Welcome to the world of UI coding :)

Edit - expecting such a drop down? with all anchor tags. Code available here.

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download