The segmented button's dropdown menu in Bootstrap is malfunctioning on Firefox version 27.0.1

I'm attempting to create a basic search bar using Bootstrap's segmented button feature (check out an example at http://getbootstrap.com/components/#input-groups-buttons-segmented).

This is the code I have so far, and it's accessible on jsfiddle http://jsfiddle.net/jwayne2978/E2ACU/.

<div style="width:500px; margin:auto">
  <div class="input-group">
    <input type="text" class="form-control input-sm">
    <div class="input-group-btn">
        <button type="button" class="btn btn-default btn-sm">Search</button>
        <button type="button" class="btn btn-default dropdown-toggle btn-dropdown" data-toggle="dropdown">
          <span class="caret"></span>
        </button>
        <ul class="dropdown-menu" role="menu">
            <li><a href="#">option 1</a></li>
            <li><a href="#">option 2</a></li>
            <li><a href="#">option 3</a></li>
        </ul>
    </div>
  </div>
</div>

The issue I'm encountering is that this HTML setup functions correctly in Chrome v33.0.x.y and IE v10, but not Firefox v27.0.1.

In Firefox, rather than the drop-down list showing up right below the drop-down button on the right side, it appears under the search field on the left.

Any insights into what might be causing this? Any assistance would be greatly appreciated.

Answer №1

Make sure to include the pull-right class for the dropdown. Here is how it should look:

<ul class="dropdown-menu pull-right" role="menu">

Check out the demo here

By adding this class, Bootstrap will automatically apply the following styles:

.dropdown-menu.pull-right {
  right: 0;
  left: auto;
}

Additionally, I also included a btn-sm class to align your dropdown-toggle properly.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The CSS top border is failing to display

For a school project, I've been attempting to add a top border to a set of hyperlinks in order to separate them from the title. However, after spending over an hour on this task, I still can't seem to get it to work. Below is the CSS code for th ...

Is it better to use multiple external style sheets?

Hello! I am looking to implement a pop-up login screen by integrating downloaded code. The issue I am facing is that the CSS file that accompanies it clashes with my current one. Is there a way to have a specific style sheet only affect certain div tags, ...

Video is not visible in safari browser initially, but becomes visible only after scrolling for a little while

Having issues with a video not displaying correctly in Safari? The problem is that the video only becomes visible after scrolling the browser window. Want to see an example of this issue in action? Click here and select the red bag. Check out the code sni ...

Is there a way to prevent a 'keyup' event from being triggered by a 'keydown' event?

I have a tool that resolves zip codes and I am currently utilizing a keyup event handler to trigger a server query once the input length reaches 5 characters. However, I want to prevent unnecessary calls to the script, so I am exploring the possibility o ...

Setting constraints for table size with min-width and max-height

I have a coding dilemma involving the min-width and max-height properties in my table. The issue arises when I try to set these properties on the td element – they are being ignored by the browser. If I nest a div with the properties inside a td, the con ...

Combining the Power of Bootstrap with Yii Framework

As a newcomer to the Yii framework, I am looking to incorporate my Bootstrap design into this platform. One issue I have encountered is related to my custom CSS. In Bootstrap, we use navbar-default for styling the navbar. I customized my navbar color by ...

Discovering the presence of line breaks

I have searched extensively on Google, but I am struggling to find a definitive answer. My goal is to create an email simulation where users can input text into a textarea and save it to the database. They should then be able to return to the page later a ...

What is the best way to detect and handle the destroy event in Kendo UI grids when a click event

How can I trigger a function when the delete button in a grid is clicked using JavaScript? ...

Mobile Chrome allows users to utilize the IFrame player API for enhanced video

Currently, I am working on creating a mobile website where I plan to include some YouTube videos using the IFrame player API (https://developers.google.com/youtube/iframe_api_reference). My main goal is to have the video start playing only after the user ...

Creating a sleek CSS drop-down navigation menu

I seem to be facing an issue with the side navigation drop down menu. Below are the link and CSS code: <nav id="nav"> <div class="menu-main_nav-container"><ul id="menu-main_nav" class="menu"><li id="menu-item-270" class="menu-it ...

How can I manually set a date in Angular bootstrap datepicker?

Using the Angularjs Bootstrap datepicker has been a great experience, but I encountered a problem when attempting to select the date using JavaScript. How can I ensure that the selected date in the datepicker matches the date read from a specific object, s ...

Ensuring the validation of numerous HTML forms within a single page

Looking for a way to validate two forms on the same .php page within my manual account activation system. The two forms I have are: Accept form Decline form Upon entering a username and clicking the button on either of these forms, PHP code is executed ...

Using an ajax call to dynamically generate an array for jquery autocomplete feature

Struggling to implement a jQuery UI autocomplete feature using data from a database via an AJAX call. Having difficulty figuring out how to pass the table of values to the autocomplete function. $( document ).ready(function() { $.ajax({ url ...

Is there a way to efficiently add delimiters to an array using jquery dynamically?

Just joined this community and still figuring things out. I have a question - how can I use jQuery to dynamically add a delimiter like "|" after every 3 elements in an array? This way, I can explode the array and utilize the resulting arrays separately. He ...

Order a set of date strings in an array using JavaScript

Despite my attempts with underscorejs, I found that the min and max methods cannot handle strings as they return infinite. Is there a way around this limitation? Here is a sample array: dateData = ["26/06/2016", "04/06/2016", "13/05/2016", "20/07/2016"] ...

Adding a detached element under certain conditions

When attempting to add a detached span based on a specific condition, I encountered the following situation. const arrow = d3 .create('span') .classed('arrow', true) .text('\u2192'); //d3.select('bod ...

Changing class in jQuery ignores CSS style

I have a id="header" div that initially has css rule: padding: 25px 0;. I want to decrease the padding of this div when scrolling down the page. $(document).ready(function() { var headerID = $("#header"); $(this).scroll(function() { if (!$(this).s ...

The height percentage is not functioning properly even though it has been applied to the html, body, and all wrapper elements

I've been facing a persistent challenge with the height:100% problem. It seems like it should be an easy fix by ensuring all wrapper elements and html, body have height:100%, but no matter what I try, the containers still won't reach the bottom o ...

Ways to position Bootstrap 4 navbar elements at the bottom

Struggling to adjust the alignment of the text in the navbar items using Bootstrap 4? My initial thought was to align them at the bottom of the ul and then position the ul accordingly, but I'm facing challenges with both. The objective is to have the ...

hover effect with fading transition while mouse is still hovering

Is there a way to create a fade-in/fade-out effect on a div without the mouse needing to leave the area? Let me provide a clearer explanation: When the mouse enters the object The object gradually fades in Then, after a delay, the object fades out while ...