Bootstrap Dropdown gets hidden behind other elements

I have a layout that combines bootstrap accordion and dropdown elements. However, the issue is that the dropdown menu appears behind the following question card, making it difficult for users to see.

template.html:

<div class="card-body">
  <!-- Accordion -->
  <div class="accordion" id="dlns_faqs_acordion">
    {% for element in elements %}
      <div class="card">
        <div class="card-header dlns_faqs_acordion_heading" id="dlns_faqs_acordion_heading_{{ forloop.counter0 }}">
          <h2 class="mb-0">
            <button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#dlns_faqs_acordion_content_{{ forloop.counter0 }}" aria-expanded="false" aria-controls="dlns_faqs_acordion_content_{{ forloop.counter0 }}">
              {{ element.question }}
            </button>
          </h2>
          <!-- Options -->
          <div class="dropdown">
            <button class="btn dlns_elements_button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              <span class="fas fa-ellipsis-h"></span>
            </button>
            <div class="dropdown-menu dropdown-menu-right text-center" arial-labelledby="option_button">
              ...
              <a>...</a>
              ...
            </div>
          </div>
        </div>
        <div id="dlns_faqs_acordion_content_{{ forloop.counter0 }}" class="dlns_faqs_acordion_content collapse" aria-labelledby="dlns_faqs_acordion_heading_{{ forloop.counter0 }}" data-parent="#dlns_faqs_acordion">
          <div class="card-body">
            {{ element.answer }}
          </div>
        </div>
    </div>
    {% endfor %}
  </div>
</div>

style.css:

.dlns_faqs_acordion {
  border: none;
}

.dlns_faqs_acordion_heading {
  border: none;
  background: transparent;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  flex-direction: row;
  align-content: space-between;
}

.dlns_faqs_acordion_heading button {
  color: var(--dlns_color_primary) !important;
}

.dlns_faqs_acordion_heading button.collapsed {
  color: black !important;
}

.dlns_faqs_acordion_heading button:hover {
  text-decoration: none;
}

.dlns_faqs_acordion_content {
  color: var(--dlns_color_tertiary);
}

Here are some screenshots demonstrating the problem:

https://i.sstatic.net/bznWu.png https://i.sstatic.net/F6eM0.png

And the Fiddle:

https://jsfiddle.net/albertosanmartinez/o287rysk/12/

If anyone could provide assistance with this issue, it would be greatly appreciated. Thank you in advance.

Answer №1

Without providing a fiddle or plnkr, I can only offer some suggestions:

  • Try adjusting the z-index of the dropdown-menu box to a very high value and see if it resolves the issue.
  • Check the container that is cutting off the dropdown-menu to ensure the overflow property is set to visible.

Update:

.card {
  overflow: visible;
}

https://jsfiddle.net/65fq347r/

Answer №2

If you've stumbled upon this page via a search engine: In my case, the issue was caused by an opacity setting on a parent div element.

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

Tips for incorporating a star into a label and customizing its CSS in React

I need help customizing the appearance of an asterisk on my label without affecting the rest of the label. The CSS for the label is directly in the Textfield component code. Here is a snippet of the code: <TextField className="sign-up-input-field&q ...

Concealing and revealing an element using the CSS property visibility:hidden/visible

There are two div-boxes that should show/hide when clicking on another two div-boxes. I want the divs to maintain their space so as not to disrupt the DOM, ruling out the use of .toggle(). I attempted this approach without success: $('#red, #pink&ap ...

The sorting of elements using the jQuery sort() function encounters issues on webkit browsers

Looking for a solution to sort elements by a number? Consider this part of a function that does just that. The number used for sorting is fetched from a data-ranking attribute of the element: $(".tab_entry").sort(function(a,b){ return parseFloat(a.dat ...

center the view on the specified element

Utilizing ReactJs, I am developing a horizontal timeline that showcases dates. For instance, there is a list of 100 elements, each containing a date and text content. The dates are displayed horizontally using flex-direction="row" and overflowX ...

Creating an overlapping effect between a card deck and a carousel design

My goal is to create a website that resembles the design in this https://i.sstatic.net/WjaIE.png link. You'll notice there's currently a white background behind my yellow background and carousel. Is there a way to change the background color beh ...

Issue encountered: "File is not found" error message is displayed while executing Django's manage.py script

Every time I try to run Django with 'python manage.py runserver', makemigrations, or migrate, I encounter the same frustrating error message: (env) mark@mysite$ python manage.py runserver File doesn't exist File doesn't exist Watching ...

python variable determines the call type

Everything goes smoothly with the following code: import someapp.models dump_data(someapp.models.MyModel, using='dumpingdb') However, the code below encounters an issue: import someapp.models modelType = MyModel dump_data(someapp.models.mode ...

Django list item formatting

I'm currently working on creating a Django template to display a list of items with 2 action buttons. Here is my form class: class AppsForm(forms.Form): def __init__(self, *args, **kwargs): policiesList = kwargs.pop('policiesList&ap ...

Tips for making a standout testimonial card?

Apologies for the simplistic inquiry. As a fresh student of a full stack web developer bootcamp, I find myself grappling with this particular challenge. How can I go about creating a testimonial card similar to this one? I've attempted to write code ...

How to create line breaks in Angular Material matTooltip elements?

I am currently utilizing Angular 7 along with Angular material matTooltip. My goal is to have the tooltip display each element on a separate line, similar to this: https://i.sstatic.net/faVoo.png However, I am encountering an issue where it displays thr ...

Scrollable content with sticky positioning using CSS3 and JavaScript

I successfully implemented a sidebar using the position: sticky property and it is functioning perfectly. To identify colors in the following text, refer to the script below. When scrolling, the black area remains fixed while the green area sticks to its ...

Ways to append each list item from one unordered list to the end of another based on their unique styles

I am in the process of making a website responsive and I am faced with the task of combining two different menus. In order to achieve this, I need to transfer all list items (li) from one unordered list (ul) to another. Provided below is a simplified vers ...

Is it possible to have a stripped-down version of Saleor without any frontend frameworks, similar to a more basic setup?

Considering using Saleor for a specialized "single-type-product" online store. After installing Saleor, I noticed that it comes with a large requirements file that includes react.js and numerous other frontend components. I am not interested in these add ...

What is the best way to avoid flickering while updating the href of a stylesheets link?

Let's talk about a cool theme switcher feature. Specifically, I've implemented one for changing themes in Bootstrap using Bootswatch themes. <script src="/jquery/dist/jquery.min.js"></script> <script src="/bootst ...

Unique design Radio Button Inputs with Custom CSS Styling and Enhanced Accessibility for Voice Controls

On my website, I have implemented custom radio buttons using this model: The custom radio buttons are working well with various browsers and are accessible with Jaws. However, I encountered an issue when trying to use Voice Over as the radio button canno ...

Modernizing web design with Bootstrap

Attempting to create a unique column layout for different device sizes. For medium (md) and larger devices, 2 columns are used: md-8 and md-4. However, on smaller devices, the intention is to display half of the content in the md-8 column, followed by half ...

Expanding the width of CSS dropdown menus according to their content

When attempting to create a dynamic dropdown menu, I encountered an issue where the values were skewed in Internet Explorer if they exceeded the width of the dropdown. To fix this problem, I added select:hover{width:auto;position:absolute}. However, now th ...

Using a PHP variable to dynamically change the style sheet by connecting to a MySQL database

My goal is to have the stylesheet URLs stored in a database and be able to change the stylesheets' href using variables in HTML tags. However, when I tried the following code, nothing happened: global $theme_addresss; global $showdetail_dbtadbiruse ...

Responsive images in CSS3/HTML5 are designed to adapt to different

I am looking to implement responsive image sizing based on the webpage size. My images come in two different sizes: <img src="images/img1.jpg" data-big="images/img1.jpg" data-small="images/img1small.jpg" alt=""></img> The data-small image has ...

Mastering the CSS Art of Working with Sprite Images and Their Positioning

I am currently working on an educational project as a front-end developer, where I aim to clone the Google homepage. To achieve this, I am utilizing Google's own sprite and here is the image of the sprite that I am using. https://i.stack.imgur.com/YT ...