Добрый день, просто спрашиваю, как я могу центрировать текст в моих условиях и положениях на модальном всплывающем окне. добавление модального CSS, чтобы попытаться центрировать его, похоже, не работает. спасибо всем, кто может помочь.
HTML:
<div class = "modal fade" id = "myModal" tabindex = "-1" role = "dialog" aria-labelledby = "myModalLabel" aria-hidden = "true">
<div class = "modal-dialog modal-lg">
<div class = "modal-content">
<div class = "container spacer text-align-justify">
<div class = "row">
<div class = "col-md-12 col-xs-12 spacer"><br><br></div> <!--spacer-->
<div class = "col-md-12" style = "width: 700px;">
<div class = "col-md-12 text-align-center">
<h2 class = "bold_font">GENERAL TERMS AND CONDITIONS</h2>
<br><br><br><br>
</div>..................................................
................................... УСЛОВИЯ СОДЕРЖАНИЕ
CSS:
.modal {
width: 300px;
height: 300px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -150px;
margin-top: -150px;
}






Ваш css,
.modal {
width: 300px;
height: 300px;
margin-top: 100px; #add according to your requirement
margin-left: auto;
margin-right: auto;
padding: 10px; # add if you want
}
Вы можете добавить преобразование: translate(-50%, -50%); with left: 50%; top:50%; в класс модального блока
.modal {
width: 300px;
height: 300px;
top:50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 10px;
position: absolute;
}