vertical alignment middle for modal

This commit is contained in:
ARvind Tiwari 2017-07-24 17:55:36 +05:30
parent aaff4f048d
commit 805d151eea
2 changed files with 64 additions and 21 deletions

View file

@ -57,6 +57,7 @@
width: 90%; width: 90%;
} }
} }
/***********Styles for Model********************/ /***********Styles for Model********************/
.modal-content { .modal-content {
border-radius: 0px; border-radius: 0px;
@ -64,15 +65,23 @@
width: 100%; width: 100%;
float: left; float: left;
} }
.close {
font-size: 50px; .modal-header {
min-height: 25px;
}
.modal-header .close {
font-size: 75px;
font-weight: 300; font-weight: 300;
} margin-top: 0;
position: absolute;
top: 0;
right: 15px;
}
.modal-header { .modal-header {
border-bottom: 0px solid #e5e5e5; border-bottom: 0px solid #e5e5e5;
padding: 0px 15px; padding: 0px 15px;
width: 100%; width: 100%;
float: left;
} }
.modal-body { .modal-body {
text-align: center; text-align: center;
@ -81,7 +90,7 @@
padding: 0px 30px 15px 30px; padding: 0px 30px 15px 30px;
} }
.modal-body .modal-icon i { .modal-body .modal-icon i {
font-size: 50px; font-size: 80px;
font-weight: 100; font-weight: 100;
color: #999; color: #999;
} }
@ -93,7 +102,7 @@
font-family: 'Lato', sans-serif; font-family: 'Lato', sans-serif;
} }
.modal-text { .modal-text {
padding-top: 20px; padding-top: 15px;
font-size: 16px; font-size: 16px;
} }
.modal-footer { .modal-footer {
@ -101,30 +110,61 @@
width: 100%; width: 100%;
float: left; float: left;
text-align: center; text-align: center;
padding: 30px 15px; padding: 15px 15px;
} }
@media (min-width: 1300px) { @media (min-width: 1300px) {
.modal-dialog { .modal-dialog {/* top: 30%; */width: 30%;}
top: 30%;
width: 25%;
}
} }
@media (max-width: 1299px) { @media (max-width: 1299px) {
.modal-dialog { .modal-dialog {
top: 20%; /* top: 20%; */
width: 43%; width: 43%;
} }
} }
@media (max-width: 900px) { @media (max-width: 900px) {
.modal-dialog { .modal-dialog {
top: 20%; /* top: 20%; */
width: 50%; width: 50%;
} }
} }
@media (max-width: 767px) { @media (max-width: 767px) {
.modal-dialog { .modal-dialog {
top: 30%; /* top: 30%; */
width: 90%; width: 90%;
margin: 0 auto !important; margin: 0 auto !important;
} }
} }
@media(min-width: 320px) {
.modal:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
margin-right: -4px;
}
}
@media (min-width: 768px) {
.modal-dialog {
/* width: 520px; */
margin: 15px auto;
}
}
.modal {
text-align: center;
}
.modal-dialog {
display: inline-block;
text-align: left;
vertical-align: middle;
}
.modal-content {
border-radius: 0;
font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 300;
}

View file

@ -52,14 +52,17 @@
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="modal-icon"><i class="fa fa-question" aria-hidden="true"></i></div> <h4 class="modal-title" id="ModalLabel">{% trans "Do You want to delete your order?"%}</h4>
<h4 class="modal-title" id="ModalLabel">{% trans "Cancel Order"%}</h4>
<p class="modal-text">{% trans "Do you want to delete your order?"%}</p>
<form method="post" <form method="post"
action="{% url 'hosting:delete_order' order.id %}"> action="{% url 'hosting:delete_order' order.id %}">
{% csrf_token %} {% csrf_token %}
<div class="modal-footer"> <div class="modal-footer">
<button type="submit" class="btn btn-danger btn-ok">{% trans "Delete"%} <button type="button" class="btn btn-default"
data-dismiss="modal">
{% trans "Close"%}
</button>
<button type="submit" class="btn btn-primary">{% trans "Delete"%}
</button> </button>
</div> </div>
</form> </form>