Answers for "make good dropdown with content in bootstrap"

11

create a dropdown in html bootstrap

<div class="dropdown">
  <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    Dropdown
  </button>
  <div class="dropdown-menu" aria-labelledby="dropdownMenu2">
    <button class="dropdown-item" type="button">Action</button>
    <button class="dropdown-item" type="button">Another action</button>
    <button class="dropdown-item" type="button">Something else here</button>
  </div>
</div>
Posted by: Guest on May-28-2020
1

bootstrap dropdown

.dropdown
Add a simple dropdown menu with buttons.
<div class=”dropdown”>
 <button class=”btn btn-secondary dropdown-toggle”
 type=”button” id=”dropdownMenu1” data-toggle=”dropdown”
 aria-haspopup=”true” aria-expanded=”false”>
 Dropdown
 </button>
 <div class=”dropdown-menu” aria-labelledby=”dropdownMenu1”>
 <a class=”dropdown-item” href=”#!”>Action</a>
 <a class=”dropdown-item” href=”#!”>Another action</a>
 </div>
</div>
.dropdown-toggle-split
Create split button dropdowns with proper spacing around the dropdown caret.
<div class=”btn-group”>
 <button type=”button” class=”btn btn-secondary”>Dropdown</button>
 <button type=”button” class=”btn btn-secondary dropdown-toggle dropdown-togglesplit” data-toggle=”dropdown” aria-haspopup=”true” aria-expanded=”false”>
 <span class=”sr-only”>Toggle Dropdown</span>
 </button>
 <div class=”dropdown-menu”>
 <a class=”dropdown-item” href=”#!”>Action</a>
 <a class=”dropdown-item” href=”#!”>Another action</a>
 </div>
</div>
.dropup
Did you know that you can style a menu coming up rather than down? Now you do!
<!-- Default dropup button -->
<div class=”btn-group dropup”>
 <button type=”button” class=”btn btn-secondary dropdown-toggle” datatoggle=”dropdown” aria-haspopup=”true” aria-expanded=”false”>
 Dropup
 </button>
 <div class=”dropdown-menu”>
 <!-- Dropdown menu links -->
 </div>
</div>
.dropright
Provide the menu to the right of the button.
 <!-- Default dropright button -->
<div class=”btn-group dropright”>
 <button type=”button” class=”btn btn-secondary dropdown-toggle” datatoggle=”dropdown” aria-haspopup=”true” aria-expanded=”false”>
 Dropright
 </button>
 <div class=”dropdown-menu”>
 <!-- Dropdown menu links -->
  </div>
</div>
.dropleft
...And you can also display the menu on the left.
<!-- Default dropleft button -->
<div class=”btn-group dropleft”>
 <button type=”button” class=”btn btn-secondary dropdown-toggle” datatoggle=”dropdown” aria-haspopup=”true” aria-expanded=”false”>
 Dropleft
 </button>
 <div class=”dropdown-menu”>
 <!-- Dropdown menu links -->
 </div>
</div>
.dropdown-item-text
Add non-interactive dropdown items to your menu.
<div class=”dropdown-menu”>
 <span class=”dropdown-item-text”>Plain text</span>
 <a class=”dropdown-item” href=”#”>Clickable action</a>
 <a class=”dropdown-item” href=”#”>Another action</a>
 <a class=”dropdown-item” href=”#”>Whatever else you need</a>
</div>
.dropdown-item disabled
You can also choose to disable any menu item(s).
<div class=”dropdown-menu”>
 <a class=”dropdown-item” href=”#”>Active link</a>
 <a class=”dropdown-item disabled” href=”#”>Disabled link</a>
 <a class=”dropdown-item” href=”#”>One more link</a>
</div>
.dropdown-divider
Add a simple divider between menu elements to draw extra attention.
<div class=”dropdown-divider”></div>
.dropdown-menu-right
Align the entire menu to the right
<div class=”btn-group”>
 <button type=”button” class=”btn btn-secondary dropdown-toggle” datatoggle=”dropdown” aria-haspopup=”true” aria-expanded=”false”>
 This dropdown’s menu is right-aligned
 </button>
 <div class=”dropdown-menu dropdown-menu-right”>
 <button class=”dropdown-item” type=”button”>Action</button>
 <button class=”dropdown-item” type=”button”>Another action</button>
 <button class=”dropdown-item” type=”button”>Something else here</button>
 </div>
</div>
Posted by: Guest on January-05-2021
0

on click drop down bootstrao

<p>
  <a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">
    Link with href
  </a>
  <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
    Button with data-target
  </button>
</p>
<div class="collapse" id="collapseExample">
  <div class="card card-body">
    Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
  </div>
</div>
Posted by: Guest on November-30-2020

Code answers related to "make good dropdown with content in bootstrap"

Browse Popular Code Answers by Language