What is causing this alert to remain open?

I've been struggling to close the alert within the body section. I've tried various fixes but can't seem to figure it out. Can anyone spot what's wrong here? It's just a practice exercise, but I'd really appreciate some help.

<div class="container">

    <div class="row" >
        <div class="col-12">
            <p> lorem</p>


            <p class="alert alert-success alert-dismissible">
                <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
  <strong>Success!</strong> Indicates a successful or positive action.
            </p>

        </div>
    </div>

</div>

<!--Content End-->
<script src="js/jquery-3.2.1.slim.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>

Answer №1

Consider substituting the a tag with a button tag.

According to the official bootstrap documentation, it is recommended to use a button tag for the clickable 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

JavaScript date input formatting with HTML

When using the input date picker in HTML, the default format displayed is MM-DD-YYYY. <input type="date" id="gdatum" /> Is there any method to change the mask to DD-MM-YYYY? ...

How can I position a div column-10 to the right and make it stay fixed in place

I'm having an issue trying to position a div on the right side without causing content to overlap with the navbar. I've attempted using `position:absolute top:0 right:0`, but it's not working as intended. <link href="https:// ...

Problems arose when attempting to adjust the size of the container function

I've been working on a Joomla 2.5 template that consists of three main sections: top, container, and footer. While trying to set the "container" section to have a minimum height of 100%, I faced various challenges which led me to use jQuery for assist ...

How can I modify the value of a CSS animation rule in AngularJS?

I am looking to dynamically change the value assigned to stroke-dashoffset based on a custom input. @-webkit-keyframes donut-chart-1 { to { stroke-dashoffset: 100; } } @keyframes donut-chart-1 { to { stroke-d ...

Adjust Bootstrap form positioning to be fixed at the bottom of the page

Can anyone provide assistance with positioning this form at the bottom of the page? <form> <div class="form-group"> <input type="email" class="form-control" id="" aria-describedby="emailHelp" placeholder="Enter email"> &l ...

What could be causing a full-width image render in Firefox when a nested flex item is centered?

My design involves nested containers with the display: flex; property. While Chrome/Edge display the item div correctly, in Firefox 110.0.1 the item div expands to fill the entire horizontal space within the wrapper (100% width). Which CSS properties can ...

Strange symbols were stored in the database after saving the textarea value

After submitting a form, text entered into a text area is being saved to my database. However, in one instance, certain characters such as • are appearing in the field. For example: • Text When retrieving the data from the database using Jav ...

"Enhance Your Website with Foundation 6.2's Spacious Gutter

The Foundation 6.2 documentation indicates that the default grid gutter size is 20px for small screens and 30px for medium screens. However, it fails to specify the default gutter size for large screens. Can you please provide information on the default ...

Issue with Mootools Ajax call and form submission

I'm dealing with a table that displays data from a database. I'm trying to implement a way to (a) delete rows from the table and (b) edit the content of a row in real-time. Deleting rows is working perfectly, but editing the content is proving to ...

Input tag styled in a center-aligned word document format

My Desired Text Alignment: I want the text to be centered horizontally at the top of the input. Words should break after hitting the internal padding, similar to how document creation software like Google Docs works with center alignment. Current Alignme ...

What is the best way to adjust the size of a Div slideshow using

I need help with creating a slideshow that covers my webpage width 100% and height 500px. The image resolution is 1200*575. Can someone assist me with this? CSS #slide{ width : 100%; height: 500px; } HTML <!DOCTYPE html> <html> ...

Overlapping Bootstrap cards conundrum

Does anyone know how to align Bootstrap cards and make them responsive? I have them centered, but they are overlapping and sticking to the left side. This is for email development with a maximum width of 680px. Any assistance would be greatly appreciated! ...

Looking to generate an HTML table using JavaScript?

Similar Question: Create HTML table from a Javascript array I have received an array that looks like this var univArray = new Array( {name: "Stanford University", nick: "Stanford", ownership: "private", sys: "n/a", SATh: 1550, SATl: 1360, tui ...

Initiating a horizontal scroll menu at the center of the screen: Step-by

I need assistance setting up a horizontal scrolling menu for my project. The requirement is to position the middle button in the center of the .scrollmenu div. Currently, I am working with HTML and CSS, but open to suggestions involving javascript as well ...

Utilizing a local video file as a video background in HTML and CSS

I've hit a roadblock while attempting to set a video on my computer as the background. The video file is named "runbg.avi" and it resides in the same folder as my HTML and CSS files. After scouring through numerous websites, I encountered a couple of ...

Prevent removal of h2 tag within a contenteditable segment

Can a section be made permanent within a contenteditable element to prevent user removal? I have an h2 tag inside a contentEditable div. I do not want the user to be able to edit the h2 tag, so I set contentEditable=false, but they can still select and de ...

utilizing a for-each loop in order to append upcoming events to a fully

I am currently using the FullCalendar jQuery component and attempting to add events to it by iterating through a loop of divs, but for some reason it is not working as expected. Below is the snippet of JavaScript code that I am struggling with. The commen ...

Looking for assistance with CSS border animation

Below is my code snippet: .section-one { position: relative; background: #ffffff; } .section-one h2 { color: #000000; font-size: 32px; margin: 0px 0px 10px 0px; padding: 0px; font-family: "AzoSans-Medium"; } ... /* ...

Unwanted transparency issue in MaterialUI (MUI) BottomNavigation

Greetings fellow hobby developer! I recently embarked on a project using create-react-app and incorporated MUI dependencies. One feature I added was a fixed BottomNavigation, which you can view in action here. Interestingly, in CodeSandbox, the BottomNavi ...

Having trouble incorporating autocomplete search results into an HTML table using Jquery, Ajax, and JSP

My current project involves an App that utilizes AJAX with jQuery to communicate with a Spring-boot REST controller. While the app is functional, I am facing difficulty in displaying the search results neatly within HTML tables. https://i.sstatic.net/7sw8 ...