Having trouble with my HTML CSS Bootstrap dropdown menu not functioning properly

I'm facing an issue with my dropdown in the form - it doesn't seem to be working when clicked. What's more puzzling is that I copied this code from another source, but it still isn't functioning. Despite double-checking for typos several times, I haven't been able to find any.

 <!DOCTYPE html>
   <html>

    <head>
    <link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
    <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <!------ Include the above in your HEAD tag ---------->

        <title>My Awesome Login Page</title>
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous">
        <style>
            body,
            html {
                margin: 0;
                padding: 0;
                height: 100%;
                background: #60a3bc !important;
            }

            .user_card {
                height: 430px;
                width: 350px;
                margin-top: auto;
                margin-bottom: auto;
                background: #f39c12;
                position: relative;
                display: flex;
                justify-content: center;
                flex-direction: column;
                padding: 1px;
                box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
                -webkit-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
                -moz-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
                border-radius: 5px;

            }

            .brand_logo_container {
                position: absolute;
                height: 170px;
                width: 170px;
                top: -75px;
                border-radius: 50%;
                background: #60a3bc;
                padding: 10px;
                text-align: center;
            }

            .brand_logo {
                height: 150px;
                width: 150px;
     ***
                            
                                // Content Removed for Brevity
                                                                                                        


                                
                  </div>
                    </div>


                                
                                
                        </form>
                   
                <div class="mt-4">
                    

                  
                        
                          
                    
                </div>
                


         

                    
          

               
   
  
  
                
                
                       
            
         
                      
        
            
            
              
        
    


        

Answer №1

When getting started with Bootstrap, it's important to remember that including the popper.js script is necessary for certain features like dropdowns and tooltips to function properly. Here is the script you will need:

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>

Additionally, please be aware that it appears you have imported the jQuery script twice. It may be beneficial to remove one of them to avoid any potential conflicts.

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 creating a vertical scrollbar within a row component

Is there a way to create a scrollable parent v-row with a child v-row overflowing with content so that I can nest another v-row inside the v-col and ensure it remains within the scroll element? <v-row> <v-col> <v-row> <p ...

Bootstrap causing issues with multinavibar functionality

Hi everyone, I have been using multinavbar but when I view it on mobile, the toggle and menu are not working properly. Below is the code snippet for reference: <div class="navbar navbar-default navbar-static-top" role="navigation" style="height: 114px ...

Creating a visually balanced footer in your webpage is essential to providing a cohesive design. Learn how to perfectly align left

Struggling to align my footer text in a straight line. As a beginner, I hope this question isn't too basic! Check it out below: https://i.sstatic.net/ZophZ.png I want those three lines to be in perfect alignment. I've been taught a grid method ...

Material UI AppBar fixed position that is not part of a grid container

Hey everyone, I'm really struggling with this issue. I recently set my AppBar to have a position of "fixed". However, now the appbar is no longer contained within its container and instead spans the entire screen. I've been trying to figure it ou ...

jQuery not functioning properly when attempting to add values from two input boxes within multiple input fields

I am facing an issue with a form on my website that contains input fields as shown below. I am trying to add two input boxes to calculate the values of the third input box, but it is only working correctly for the first set and not for the rest. How can ...

How to Leverage PHP for Searching Substrings in Database Table Fields

I am currently working on a PHP code snippet that aims to retrieve the last 10 rows from a database table (consisting of three fields), search for any occurrences of a specific string or substring "word," and calculate the total count, even when it appears ...

unable to distinguish authenticity from deception through filtration methods

I am looking to differentiate between true and false using filter() but it keeps initializing the value to true and false. I want all true values to appear on one side and false values on another side, with a line separating them. ...

Is it advisable to incorporate multiple images onto a single canvas?

What is the best approach to handling multiple images in HTML5? Is it preferable to create a separate canvas tag for each image or is it equally effective to have multiple images in one canvas, and how would I go about doing that? Here is the code I have ...

Validating Form Inputs with Multiple Button Options

I currently have a form with multiple buttons that trigger PHP processing. The existing code for the buttons is as follows: <button id="btn_back" class='ym-button ym-success' name="action_back">Back</button> <button id="btn_finis ...

What is the best way to arrange four HTML elements in two rows, with two elements on each row?

I'm trying to figure out a way to display a phone icon and number on one line, as well as an email icon and address on another line. body { font-family: 'Open Sans', sans-serif; background: #20b2aa; } h1 { font-size: 40px; color: ...

What is the proper way to ensure a flex item takes up 50% of the space when a gap is included in

It appears that I have misunderstood something about flexbox and am struggling to resolve the issue correctly. In my current setup, I have a flexbox container with four columns as its direct children. I want each .flexbox-item to take up 50% of the contai ...

Adaptive Style Sheets Strategy

The images below depict the concept I am trying to achieve. The first image shows a longer width while the second one represents a shorter width. The red blocks are positioned on the right and left sides, with the yellow block adjusting its width based on ...

Discover the possibilities of setting the dimensions of your anchor tags using only inline-block spans

Can anyone help me understand what is happening with this small piece of HTML code? http://jsbin.com/akome5 When viewed on various browsers such as FF4, Chrome10, IE9, IE8, Opera 11, the layout of the element appears like this: Hmm, why is this happenin ...

Failure to respond to dual part form by RemoveClass

Currently, I am utilizing jQuery to visually control a form. The issue arises when trying to remove classes from the first part of the form using removeClass. While this works initially, upon clicking the button to advance to the second part of the form, t ...

Inspecting JavaScript for any attachments

Before hitting the submit button, I need to verify if a file has been uploaded and display a warning message prompting the user to attach a file if it hasn't been done yet. I am looking for guidance on how to achieve this using JavaScript, Prototype, ...

How can one effectively generate room within an HTML/CSS file?

Within my div element, I have organized rows of three images each. These images are uniform in size. Previously, I used small, completely clear transparent images to create spaces between the images by explicitly setting their height and width. An example ...

Content being obscured by fixed-top navbar

I am facing an issue with my fixed-top navbar, which is created using the Bootstrap library. Despite padding the body from the top to prevent content from being hidden underneath it, I encounter a problem when clicking on a link such as "about us" - the to ...

Utilize CSS exclusively within a specific React component

Objective : I need to apply the complete bootstrap CSS to a single react component without affecting other components. However, other components also depend on bootstrap and use bootstrap classes. Is there a way to achieve this without modifying the clas ...

What is the best way to position divs both vertically and horizontally at the center of a container

Here is the HTML markup I'm working with: <div class="wrapper"> <div class="block new-block"></div> <div class="block used-block"></div> <div class="block service-block"></div> <div class="block ce ...

Custom Navigation Buttons in Bootstrap

I am trying to add a "next" and "previous" button to my Bootstrap Nav on my website. I have attempted this suggestion, but it ended up not updating my nav-tabs correctly and interfering with some of the bootstrap scripts that were in use. This is the curr ...