Bootstrap 4 rows causing dropdown clipping

I am experiencing a strange problem with Bootstrap 4 when using dropdown. I have additional actions listed in the dropdown menu that are supposed to be visible when clicking on the "plus icon". However, when I do click on the "plus icon", the dropdown ends up hidden behind other elements on the page. I've tried various solutions to fix this issue, including those related to dropdown menus in the navbar, but so far nothing has worked for me.

Here is a snippet of my code:

PS: To see the full code, you can check out this CodePen link.

Thank you in advance for any help!

The Issue:

https://i.sstatic.net/F0gUu.png

HTML:

<div class="container-fluid">
  <div class="row">
    <div class="col-lg-4 gallery-gutter-fix zindex-fix">
    <div class="gallery-img-wrapper-3">
        <a href="#" class="d-block h-100">
            <img class="thumbnail-basic_372 mx-auto"
                 src="https://vignette.wikia.nocookie.net/thementalist/images/e/ea/Jane-patrick-jane-32078790-457-535.jpg/revision/latest?cb=20150414045955"
                 alt="some text">
        </a>
        <div class="after-overlay">
            <div class="d-flex flex-wrapper align-items-center">
                <div class="d-flex mr-auto">
                    <div class="d-flex justify-content-end align-items-center">
                        <div class="dropdown">
                                        <span data-toggle="dropdown">
                                            <i class="fas fa-plus-circle"></i>
                                        </span>
                            <div class="dropdown-menu">
                                <div class="d-block w-100">
                                    <h4 class="text-uppercase">Add To</h4>
                                </div>
                                <div class="custom-filled-checkbox w-100">
                                    <label for="morning1">
                                        <input id="morning1" name="morning1" type="checkbox">
                                        <i class="helper"></i>Morning
                                    </label>
                                </div>
                                <div class="custom-filled-checkbox w-100">
                                    <label for="evening1">
                                        <input id="evening1" name="evening1" type="checkbox">
                                        <i class="helper"></i>Evening
                                    </label>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="d-flex">
                    <h6 class="text-uppercase">some name</h6>
                </div>
                <div class="d-flex ml-auto">
                    <div class="d-flex justify-content-end align-items-center">
                        <i class="far fa-heart"></i>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</div>

CSS:

$base-gradient-light:rgba(94, 53, 177,0.6);
$white: #fff;
.search-cover-basic {
  .gallery_wrapper {
    padding-bottom: 8px;
    padding-top: 8px;
  }
}

/*custom gutter for gallery*/
.row {
  .gallery-gutter-fix {
    padding-right: 8px;
    padding-left: 8px;
  }
}
.zindex-fix {
  z-index: 99;
}
.gallery-img-wrapper {
  border: 1px solid #DDDEDF;
  border-radius: 0.25rem;
  height: 150px;
  /*only when you need images with gradient overlay*/
  &.overlay-gradient {
    position: relative;
  }
  .after-overlay {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 50px;
    display: none;
    color: $white;
    a {
      color: $white;
      text-decoration: none;
    }
    //dropdown menus for add to playlist
  }
  &:hover {
    .after-overlay {
      display: block;
      background: $base-gradient-light;
      font-weight: bold;
      .flex-wrapper {
        padding: 5px 15px;
        height: 100%;
      }
      h6 {
        font-weight: bold;
        margin-bottom: 0.1rem;
      }
    }
  }
  /*only when you need images with gradient overlay ends*/
  .thumbnail-basic {
    object-fit: cover;
    width: 100%; /*change from 150px to 100%*/
    height: 149px;
    display: block;
    max-width: 100%;
    /*in case you need to fix portrait images*/
    &.portrait {
      object-fit: contain;
    }
  }
}
.gallery-img-wrapper-3 {
  border: 1px solid #DDDEDF;
  border-radius: 0.25rem;
  height: 372px;
  a {
    color: $white;
    text-decoration: none;
  }
  /*only when you need images with gradient overlay*/
  &.overlay-gradient {
    position: relative;
  }
  .after-overlay {
    position: relative;
    bottom: 48px;
    left: 0;
    width: 100%;
    height: 50px;
    display: none;
    color: $white;
    .dropdown-menu {
      padding:18px 12px;
      opacity:1 !important;
      z-index: 10000;
    }
  }
  .after-overlay {
    display: block;
    background: $base-gradient-light;
    font-weight: bold;
    .flex-wrapper {
      padding: 5px 15px;
      height: 100%;
    }
    h6 {
      font-weight: bold;
      margin-bottom: 0.1rem;
    }
  }
  /*only when you need images with gradient overlay ends*/

  .thumbnail-basic_372 {
    object-fit: cover;
    width: 100%; /*change from 150px to 100%*/
    height: 372px;
    display: block;
    max-width: 100%;
    /*in case you need to fix portrait images*/
    &.portrait {
      object-fit: contain;
    }
  }
}

Answer №1

Hats off to Pete for uncovering the root of this chaos.

The culprit turned out to be my custom .zindex-fix class.

.zindex-fix {
  z-index: 99;
}

I made the necessary adjustment by removing the troublesome class, and now everything is functioning smoothly!

You can verify it yourself here

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

Creating a stylish horizontal divider with circular accents at either end

Can someone help me create a border similar to the one shown in this image? I've attempted using the :after and :before CSS attributes, but without success. The HTML element is an h1 that requires a border at the bottom. Is it achievable? ...

Apple Automation: Extract a targeted string from text and transfer it to a different spot within the page

Apologies for my lack of expertise in this area, but I hope to convey my question clearly. I am working on a form where I need to input text in order to copy specific items and paste them elsewhere on the same webpage. For example, if the input text is " ...

Position 2 identical classes side by side on the horizontal axis

Currently enrolled in the MIMO HTML course and facing a challenge where I am unable to align both elements with the class="column" attribute horizontally using display: inline-block; I have attempted using float:right and other CSS properties to achieve a ...

Is Angular 11 Compatible with Internet Explorer 5?

Is there a way to make Angular 11 compatible with Internet Explorer 5? I am developing an angular solution for a client whose default browser is Internet Explorer running on version 5 (by default). Initially, I am not supposed to change any browser configu ...

Node.js Mistake - 'Attempting to import outside of a module is not allowed'

I’m currently immersed in a React project, and my focus is... Firebase.js import firebase from 'firebase/app' import 'firebase/database' import 'firebase/auth' const firebaseConfig = { apiKey: process.env.FIREBASE_AP ...

Creating an HTML Canvas using an AngularJS template

I am facing an issue with rendering html elements on a canvas using html2canvas JS. I am utilizing AngularJS for data binding on the html page, but unfortunately, the dynamic data is not showing up on the canvas generated from these html elements. For inst ...

"Utilize the power of the ajaxform jQuery plugin to automatically reset form fields

Initially, I'd like to emphasize that this is an original inquiry. My predicament is as follows: I have a chatroom php script where I utilize the ajaxForm jQuery plugin to seamlessly send new messages without having to reload the entire page. Howev ...

Can you identify the syntax of this LESS variable called @grid-breakpoints with breakpoints for xs at 0, sm at 576px, md at 768px, lg at 992px, and xl at

While exploring the bootstrap less port, I came across this interesting syntax: @grid-breakpoints: xs 0, sm 576px, md 768px, lg 992px, xl 1200px; What exactly is this? It doesn't seem to be a map or an array... How can I retriev ...

Steps to populate an array in a mongoose schema post creation:

I am faced with the challenge of working with two different schemas: var UserSchema = new Schema({ provider: String, username: String, ... categories: [{type: Schema.Types.ObjectId, ref: 'Category'}], ... }); export default mongoose.m ...

What is the best method to assign the value of a useState variable to a specific field in an array of objects for inserting data in

**I have a billing form that includes product details for the admin to fill out. One field, labeled "BillID", should automatically populate with a default value of 'Bill ID + 1' through a variable. **Below is the code: const [BillIdFetch, setB ...

Is it possible to include all visible content, even when scrolling, within the full page height?

My webpage contains content that exceeds the height of the window. I am looking for a way to retrieve the full height of my page using either jQuery or pure Javascript. Can anyone provide a solution? I have considered the following approach: $('body ...

Can you help me create a CSS Toggle similar to this design?

I am currently working on a website and I need to create a FAQs page with a specific layout. When a user clicks on a question (Q), the answer (A) should open smoothly using jQuery animation. Only one question should be visible at a time. If a user clicks ...

Having trouble with the repeat-item animation feature not functioning correctly

Take a look at this Plunker, where the animation for adding an item only seems to work properly after an item has been deleted from the list. Any suggestions on how to resolve this issue? Here is the CSS code: .repeat-item.ng-enter, .repeat-item.ng-leave ...

Angular 7 - Customize Mat-select-value color depending on a specific condition

One issue I am facing is changing the color of a selected value in a mat select based on a condition. This change should be visually apparent to the user. Although accessing mat-select-value from the styles is possible, implementing a condition using ng-cl ...

Populate the auto complete input box with items from a JSON encoded array

I have a PHP file that returns a JSON encoded array. I want to display the items from this JSON array in an autocomplete search box. In my search3.php file, I have the following code: <?php include 'db_connect.php'; $link = mysqli_connect($ho ...

Utilize ES6 syntax to bring in a package as an extension of another package

To expand map projections in D3, it is recommended to import the necessary packages like so: const d3 = require("d3") require("d3-geo-projection")(d3) This allows you to access methods such as d3-geo-projection's geoAiry method fr ...

What is causing this promise chain to not return in the correct order?

Struggling with creating a promise chain that returns results in the order they are called. The current output of resultArray has some data points swapped, causing issues for downstream processing. This is my current attempt: Promise.all(data.map( (dataPo ...

Using bootstrap with dompdf in a PDF document: a step-by-step guide

As I attempt to create a report with data from my database, I am facing an issue where the Bootstrap styling stops working when I try to render my HTML file. <?php // Here is my HTML code: ob_start(); ?> <!-- All of my content, including the lin ...

The impact of a variable in a function with XMLHttpRequest

How does the XMLHttpReqeust variable impact the functionality of the following code snippets? function getHTTPObject() { if (typeof XMLHttpRequest == "undefined") { XMLHttpRequest = function () { try { return new Ac ...

How do I specify the return type of a function in Typescript that can return more than one type?

I am facing a situation where I have a method called getFilters that retrieves various types of values. getFilters(): IListFilteringType {...} type IListFilteringTypeMultiSelect = (string | number)[]; type IListFilteringType = boolean | string | number | ...