bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

<button> element support in dropdown-menu

Open suigintou opened this issue 14 years ago • 4 comments

I would like to be able to use as elements in the dropdown menu <button> items, not just <a>. This is useful when we want to send a POST request.

suigintou avatar Apr 10 '12 08:04 suigintou

@fat Did we make this possible in 2.0.2, or 2.0.3-wip?

mdo avatar Apr 12 '12 03:04 mdo

unless i'm misunderstanding - this is just a markup thing. Nothing is preventing you from changing it.

fat avatar Apr 12 '12 04:04 fat

Ohh, I see what's going on here. No, for now we require the anchor tag. You could add a class to the appropriate styles to do this though, and then set that class on the element. We won't do that in the BS core though.

mdo avatar Apr 15 '12 08:04 mdo

For the sake of Google, adding this style to your button element (and setting "btn-link" class also) should do the trick:

.my_btn-link {
  display: block;
  padding: 2px 20px;
  clear: both;
  font-weight: normal;
  line-height: 18px;
  color: #333333;
  white-space: nowrap;
  text-decoration: none;
  margin-top: 0px !important;
  width: 100%;
  text-align: left;
  margin-left: -1px;
}

.my_btn-link:hover, .my_btn-link:focus {
  text-decoration: none;
  color: #ffffff;
  background-color: #0081c2;
  background-repeat: repeat-x;
  text-shadow: none;
}

ollyg avatar Jun 13 '13 21:06 ollyg