BS Dropdowns Basic Dropdown A dropdown menu is a toggleable menu that allows the user to select one item from a predetermined list. ------list mukava ----- Example Dropdown Example HTML CSS JavaScript Example Explained The .dropdown class represents a dropdown menu.To display the dropdown menu, use a button or link with the class of .dropdown-toggle and data-toggle=”dropdown” attributes.The .caret class adds a caret arrow icon (), indicating that the button is a dropdown.To create the dropdown menu, add the .dropdown-menu class to the <ul> element. Dropdown Divider The .divider class is used to separate links within the dropdown menu with a thin horizontal border. Example Dropdown Header ------list mukava ----- The .dropdown-header class is used to add headers within the dropdown menu. Example Dropdown header 1 Disable and Active items ------list mukava ----- Use the .active class to highlight a certain dropdown item (a blue background color is added).To deactivate an item in the dropdown menu, use the .disabled class (which has a light-grey text color and a “no-parking-sign” image when hovered): Example CSS HTML Dropdown Position ------list mukava ----- To right-align the dropdown, apply the .dropdown-menu-right class to the element with .dropdown-menu: Example Dropup ------list mukava ----- To make the dropdown menu extend upwards instead of downwards, modify the <div> element with class=”dropdown” to “dropup“: Example Dropdown Accessibility To increase accessibility for persons using screen readers, you should include the following role and aria-* attributes when building a dropdown menu: Example Tutorials HTML CSS JavaScript About Us Share this Doc BS Dropdowns Or copy link A- A A+ Explore Topic