I am using semantic UI to create a webpage (No React, NPM or anything fancy, just plain HTML/CSS). I am trying to add modal to my page but it behaves very strange as the modal height is too long. I don't have any other framework like Bootstrap included in my code.
How it behaves:
How it is supposed to behave:
Semantic UI Version: 2.4.2
Is Semantic UI Installed correctly? Yes, other components work.
<div id="myModal" class="ui basic modal">
<div class="ui icon header">
<i class="archive icon"></i>
Archive Old Messages
</div>
<div class="content">
<p>Your inbox is getting full, would you like us to enable automatic archiving of old messages?</p>
</div>
<div class="actions">
<div class="ui red basic cancel inverted button">
<i class="remove icon"></i>
No
</div>
<div class="ui green ok inverted button">
<i class="checkmark icon"></i>
Yes
</div>
</div>
</div>
$('.ui.basic.modal')
.modal('show')
;
#myModal { position: relative;}
and then adding id to my modal, as explained in this answer: https://stackoverflow.com/a/40774996/10934182body{ max-height: 100vh; }
as explained here: semantic-ui modal stretching window heightThanks!!
In your JSfiddle I noticed your div inside of .modal-content
has min-height: 1000px
. I removed this and the modal is normal height now.