My modal has a close button at the bottom, but its position seems to be shifting up and down based on the length of the comment section directly above it. I'm looking for a way to keep the close button fixed at the bottom regardless of the comment section's length. I tried using relative positioning, but I welcome any better suggestions on how to achieve this. Thank you.
View:
<div class="form-horizontal">
<div class="modal-title title">
<p>@ViewBag.name<span> Info</span></p>
</div>
<div id="info">
<p>@Html.Label("Name: ") @ViewBag.name</p>
<p>@Html.Label("Age: ") @ViewBag.age</p>
<p>@Html.Label("Comment: ") @ViewBag.comment</p>
</div>
<div id="close">
<div class="col-md-12">
<input type="button" id="closeButton" value="Close" class="btn btn-default" />
</div>
</div>
</div>
CSS:
.btn {
border: 2px solid transparent;
background: white;
color: black;
font-size: 16px;
line-height: 15px;
padding: 10px 0;
display: block;
width: 150px;
margin: 0 auto;
}
.title {
position: relative;
top: 20px;
}
.title p {
text-align: center;
font-size: 30px;
}
.title span {
color: black;
}
#info {
position: relative;
top: 50px;
left: 20px;
}
#info p {
font-size: 15px !important;
width: 310px;
}
#close {
position: relative;
top: 70px;
}