I am using Bootstrap but I don't know why the dropdown menu is in the middle-left.
Screenshot:
Code:
<td><button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
<ul class="dropdown-menu" role="menu" >
<li class="dropdown"><a href="#">Edit</a></li>
<li class="dropdown"><a href="warga/delete/<?php echo $a->id;?>">Delete</a></li>
</ul>
</td>
Use data-offset or data-reference to change the location of the dropdown.
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is an intentional design decision. Dropdowns are built on a third party library, Popper.
To change the dropdown button color:Wrap your DropdownButton inside the Container . Inside the Container , add the decoration property and assign the BoxDecoration widget. Inside the BoxDecoration add the color property and assign the color of your choice.
Wrap your code within <div class="dropdown">
(Example)
<td>
<div class="dropdown">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
<ul class="dropdown-menu" role="menu" >
<li class="dropdown"><a href="#">Edit</a></li>
<li class="dropdown"><a href="warga/delete/<?php echo $a->id;?>">Delete</a></li>
</ul>
</div>
</td>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With