Upon initial inspection, it appears that you may have overlooked connecting the <button>
to the modal form.
<button class="btn" id="subscribe-modal-open">Subscribe</button>
It seems like some data-
attributes are needed. This modification should resolve the issue:
<button class="btn" id="subscribe-modal-open" data-bs-toggle="modal" data-bs-target="#subscribe-modal">Subscribe</button>
Furthermore, you should remove this entire section from your style.css
. The properties specified (such as z-index
, width
, top
/left
, background
) do not align with the intended functionality when integrated with Bootstrap modal components)
#subscribe-modal{
text-align: center;
width:100%;
color:#fff;
background:red;
top: 0;
left: 0;
z-index: 1000;
}
Last but not least, several issues were introduced in the Bootstrap dialog HTML code while troubleshooting the initial problem. Some tags were omitted, and certain Bootstrap class
names were mistakenly used as id
. I recommend updating the content between your <!-- Subscribe Model -->
comments with the following:
<!-- Subscribe Model -->
<div id="subscribe-modal" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title">Subscribe Our Channel</h2>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
<form>
<input type="email" name="email" id="">
<input type="submit" value="Submit now">
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<!-- Subscribe Model -->
After cloning your repository and conducting tests, I can confirm that these adjustments address the various issues.