Adding href to one button in btn-toolbar and maintaining alignment

后端 未结 3 1520
迷失自我
迷失自我 2021-02-19 06:05

I want to add an href to the Contact Sales button in the following code. If I wrap the button in an anchor tag the button moves down out of alignment with the other button (it

3条回答
  •  南方客
    南方客 (楼主)
    2021-02-19 06:44

    In Bootstrap, anchors with a "btn" class are styled identically to buttons. Therefore, you can actually change the 'Contact Sales' button into an anchor while preserving the button style.

    Untested (since jsFiddles don't seem to elicit the problem you're having):

         
    

    I also removed the dropdown-toggle class from the anchor, because I'm guessing you don't want it to be both a link and a dropdown toggle.

提交回复
热议问题