Problem with overflowing in Bootstrap modal

Within my Bootstrap modal, there is a button that triggers the display of a dropdown menu right under it. This dropdown contains an unordered list with anchor links.

The issue arises when the height of the modal's container isn't set high enough; this leads to the last items in the dropdown not being visible because they extend beyond the modal boundaries.

To solve this problem, I refrained from using overflow and instead focused on custom styling for the dropdown menu, which I created myself.

This is the CSS code snippet for the dropdown:

.wrapper-for-dropdown {
width: 300px;
z-index:9999;
color: #333;
background-color: #fff;
position: absolute;
display: none;
border: solid;
border-width: 1px;
border-radius: 4px;
border-color:#ccc;
overflow-wrap:normal;
}

.wrapper-for-dropdown:hover {
    border: solid;
    border-width: 1px;
    border-color: #ccc;
}
.dropdown-ul {
list-style-type: none;
-moz-st color: white;
text-align: left;
padding-left: 10px;
overflow-y: visible;
 }
 .dropdown-ul li {
float: left;
display: inline-block;
height: auto;
width: 250px;

}
.dropdown-ul li:hover {
}
.dropdown-ul li a {
    color: #38546d;
    display: block;
    float: left;
}


.dropdown-ul li a:hover {
        color: black;
        display: block;
        float: left;
 }

HTML: 

 <!-- Modal -->
            <div class="modal" id="modalCreateNewManualResync" tabindex="-1" role="dialog" aria-labelledby="modalCreateNewManualResyncLabel" aria-hidden="true">
                <div class="modal-dialog" id="createNewSyncDialog">
                    <div class="modal-content" style="">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="modalCreateNewManualResyncLabel">Create New Resync
                            </h4>
                        </div>

                        <!-- Model Body -->
                        <div class="modal-body" >
                            <div class="container-fluid">
                                <div class="modal-content-div">
                                    <label>Company:</label>
                                    <label>Sync Reason:</label>
                                </div>
                                <div class="modal-content-div-data">
                                    <button class="btn btn-default" id="buttonCompaniesList" onclick="listCompaniesToogle();" type="button" style="display: inline-block; width: 180px;">Select Company<span id="spanArrowIndicator" style="margin-left: 10px; margin-right: 10px;" class="caret"></span></button>
                                    <div id="wraptest" class="wrapper-for-dropdown">
                                        <ul id="ulcompanies" class="dropdown-ul">

                                        </ul>
                                    </div>
                                    <input type="text" />
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">Close<span style="margin-left: 10px;" class="glyphicon glyphicon-remove"></span></button>
                                    <button type="button" class="btn btn-default">Create<span style="margin-left: 10px;" class="glyphicon glyphicon-ok"></span></button>
                                 </div>
                             </div>
                        </div>
                        <!--End Of Modal Body -->
                     </div>
                 </div>

![Example screenshot showing GUI where Italy and International are unclickable][1]

[1]Italy and International is not clickable: https://i.sstatic.net/uVcLj.jpg

Answer №1

After implementing the following code:

.modal {overflow: visible}

The problem was resolved successfully. It is important not to make any additional modifications to .model-body.

In addition, removing some unnecessary styles from my own div also helped solve the issue by setting the height to auto.

Thank you for your assistance.

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

Exploring document in Node.js

Is there a way to read the data of a file (for example, read.txt) in Node.js without buffering the data? I want to access the content of the file directly rather than as buffered data. Also, how can I delete a folder in Node.js? ...

Encountering an issue with the history module when utilizing the webpack dev server

I am encountering an issue while trying to run webpack dev server. The history functionality was working fine until I started using the webpack module. A warning message appeared in my console: WARNING in ./src/history.js 2:15-35 export 'createBrows ...

Using a JavaScript class rather than an ID for toggling visibility

As a complete newbie to JavaScript, I've come across similar questions but I'm lost when it comes to coding - help needed! So here's the code I have so far, and I'm hoping someone can assist me. Currently, I have JavaScript set up to s ...

Status and route redirection in Vue instance management

I am looking to establish a global status property for my application using vue.js and vue-router. This property should be shared between components and used to control access to certain routes based on its value. For instance, I want to redirect all rout ...

What methods are available to keep a component in a fixed position on the window during certain scrolling intervals?

I need help creating a sidebar similar to the one on this Airbnb page. Does anyone have suggestions for how to make a component stay fixed until you scroll past a certain section of the page? I am working with functional React and Material-UI components, ...

What is the best way to dynamically insert a directive element between an already existing parent directive and its child directive?

Background: Working within the constraints of a custom CMS that limits access to the code base, I am exploring the option of using JavaScript for DOM manipulations in certain scenarios. Problem: The issue I am facing involves a container directive conta ...

Issue: ng-disabled directive is not functioning properly on buttons in Foundation for Apps.In

I recently encountered an issue with a Foundation for Apps button not working properly with the ng-disabled directive in a form. Here is the HTML code: <form name="loginForm" novalidate> <div class="grid-bloc ...

Leverage Express JS to prevent unauthorized requests from the Client Side

Exploring the functionalities of the Express router: const express = require("express"); const router = express.Router(); const DUMMY_PLACES = [ { id: "p1", title: "Empire State Building", description: "One of the most famous sky scrapers i ...

implementing a timestamp in a specific timezone with Vue.js

Utilizing a timestamp attribute, I have successfully implemented the display of the current time and date on my webpage. Is there a way to showcase this information in a specific time zone? I am looking to present it in the ZULU timezone, which remains st ...

Tips for centering the brand in Bootstrap 5 navbar

I've been attempting to center a Bootstrap 5 navbar, but so far I haven't had any luck. My goal is to have both the logo and links centered, but when the screen size is too small, the navbar still collapses using the toggler. Here is the code I&a ...

Is it possible to use the HTML script tag without specifying the type attribute as JavaScript? <script type="text/html"></script>?

While examining the source code of an HTML page, I stumbled upon the following snippet: <script id="searchItemTemplate" type="text/html"> <# var rows = Math.floor((Model.RecordsPerPage - 1) / 3 + 1); for (var i = 0; i < rows; ++i){ ...

How can I include JavaScript in an HTML document?

My folder structure is as follows: Inside webapp/WEB-INF/some.jsp, I also have a javascript file located in the same directory at webapp/WEB-INF/js/myform.js. I referenced it in some.jsp like this: <script type="text/javascript" src="js/myform.js"> ...

Ensure that the value in the array is verified using jQuery for errors

HTML <table id="gwForm"> <tbody> <tr data-id="1"></tr> <tr data-id="2"></tr> </tbody> </table> Script var ids = []; $("#gwForm tbody tr").each(function(index, el){ ids.push($(el).data ...

Expanding beyond the dimensions of the webpage, HTML CSS Height set to 100% creates a unique

I'm struggling with the CSS on a page I'm working on. I have a header and main content each enclosed in div tags, with the header set to a height of 250px and the main content set to a height of 100%. I've also set the html and body heights ...

Prevent default behavior in jQuery UI Dialog and resume default behavior on button click

I'm currently utilizing jQuery UI to display a dialog box that asks, "Do you truly wish to proceed with this action?" whenever a user clicks on a hyperlink or a form button. If the user chooses "Confirm", I want to execute the original default action ...

Guide to making a Typescript interface by combining elements from two separate interfaces without utilizing inheritance

Programming Language: Typescript I am looking to combine the properties of two interfaces as the value of an indexable-type within a third interface. Interface 1: export interface Employee { id: string name: string } Interface 2: export interfa ...

CsvIssue: Opening Quote Error: a quotation mark was detected within a field on line 9618

Encountering an error while attempting to parse kepler_data.csv using csv-parse with promises, as instructed by Adam and Andre Negoi in the NodeJS course. Below is the code snippet: function loadPlanetsData() { return new Promise((resolve, reject) => ...

Does Next.js pre-render every page, or does it only pre-render the initial page?

As I dive into the world of nextjs, I'm coming across conflicting information. Some sources claim that nextjs only prerenders the first page, while others suggest that all pages are prerendered by default. This contradiction has left me confused about ...

Exploring Deeply Nested JSON Data using AngularJS

I'm encountering some difficulties while attempting to extract data from Behance.net. There are two specific issues that I am facing in retrieving the necessary information. The first challenge arises when trying to retrieve the project description. ...

How to Test React Js API Calls with Jest?

I'm currently in the process of writing test cases for my API call function, but I'm encountering difficulties as I am unable to successfully run my tests. Below is the code for the API call function and the corresponding test cases. export async ...