Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8115851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:36:00+00:00 2026-06-06T03:36:00+00:00

I have been trying to get Twitter Bootstrap btn-group with dropdown to work for

  • 0

I have been trying to get Twitter Bootstrap btn-group with dropdown to work for multiple buttons that have a drop down menu.

Example:

  <div class="btn-group">
      <a href="#" class="btn">1</a>
      <a href="#" class="btn">2</a>
      <a href="#" class="btn">3</a>
      <a href="#" class="btn">4</a>
      <a href="#" class="btn">5</a>
  </div>

And also my attempt: http://jsfiddle.net/x2BGB/

This displays a button group. I would like some of the buttons in that group to have drop down menus.

An example of what I am trying to achieve is:
enter image description here

Note: the grouped button “bar” should not have rounded cornes when a button is next to another button. (right side).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:36:02+00:00Added an answer on June 6, 2026 at 3:36 am

    I’ve created a class btn-toolbar2 to avoid conflict and overide btn-toolbar default behavior.

    Dropdowns must be in their own btn-group.

    <div class="btn-toolbar btn-toolbar2">
      <div class="btn-group">
        <button class="btn">Dashboard</button>
      </div>
      <div class="btn-group">
        <button class="btn">Button 1</button>
        <button class="btn dropdown-toggle" data-toggle="dropdown">
          <span class="caret"></span>
        </button>
        <ul class="dropdown-menu">
          <li><a href="#">Action</a></li>
          <li><a href="#">Another action</a></li>
          <li><a href="#">Something else here</a></li>
          <li class="divider"></li><li><a href="#">Separated link</a></li>
        </ul>
      </div>
      <div class="btn-group">
        <button class="btn">Item 3</button>
        <button class="btn dropdown-toggle" data-toggle="dropdown">
          <span class="caret"></span>
        </button>
        <ul class="dropdown-menu">
          <li><a href="#">Action</a></li>
          <li><a href="#">Another action</a></li>
          <li><a href="#">Something else here</a></li>
          <li class="divider"></li>
          <li><a href="#">Separated link</a></li>
        </ul>
      </div>
    </div>
    

    with the css

    @import url('http://twitter.github.com/bootstrap/assets/css/bootstrap.css');
    
    .btn-toolbar2 >.btn-group + .btn-group {
    margin-left: -5px;
    }
    
    .btn-toolbar2 > .btn-group > .btn, .btn-toolbar2 > .btn-group > .dropdown-toggle
    {
        -webkit-border-radius: 0px;
        border-radius: 0px;
        -moz-border-radius: 0px;
    }
    
    .btn-toolbar2 > .btn-group:first-child > .btn, .btn-toolbar2 > .btn-group:first-child > .dropdown-toggle{
        -webkit-border-bottom-left-radius: 4px;
        border-bottom-left-radius: 4px;
        -webkit-border-top-left-radius: 4px;
        border-top-left-radius: 4px;
        -moz-border-radius-bottomleft: 4px;
        -moz-border-radius-topleft: 4px;    
    }
    
    .btn-toolbar2 > .btn-group:last-child > .btn:last-child, .btn-toolbar2 > .btn-group:last-child > .dropdown-toggle:nth-last-child(2){
        -webkit-border-bottom-right-radius: 4px;
        border-bottom-right-radius: 4px;
        -webkit-border-top-right-radius: 4px;
        border-top-right-radius: 4px;
        -moz-border-radius-bottomright: 4px;
        -moz-border-radius-topright: 4px;    
    }
    

    http://jsfiddle.net/baptme/x2BGB/4/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get nServiceBus to work with Ninject 2.0 as the
I have been trying to get this to work correctly and I think I
I have been trying to get this jsfiddle to work. So far without luck.
I've been trying to get OAuth for Twitter to work on my iPhone application
I have been trying to get this to work for 12 hrs now and
I have been trying to get a2billing to work for the past 4 days
I have been trying to get this to work and can't. I have a
I have been trying to get the Fusion Charts to work on Android 2.2
I have been trying to get this to work. Basically I have a search
I have been trying to get this to work for most of the day

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.