I am using Bootstrap 3.3.7 and want to know how to implement a modal window for a single image. I am trying to use inline styling only to simplify the process.
Asked
Active
Viewed 35 times
1 Answers
0
Credit to How to make Twitter bootstrap modal full screen, you can do this :
.modal-dialog {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.modal-content {
height: auto;
min-height: 100%;
border-radius: 0;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-body">
Image here
</div>
</div>

Jérôme
- 978
- 1
- 9
- 22
-
Am I supposed to insert my image like
or some other way? I do the aforementioned but my image does not show up at all on my web page. And yes, the image is in my directory. – Chris Apr 17 '20 at 12:51