我想使div居中屏幕尺寸< 768但它不會發生。我使用媒體查詢,但不會發生。我只是想讓它集中在一起。它應該調整對col-SM屏幕Bootstrap,如何在屏幕尺寸中居中div行<768
HTML
<div class="row ">
<div class="message">
<div class="col-md-3">
<img src="img/img6.png" width="75px" height="75px" class="img-responsive message-icons">
Hope for Peace
</div>
<div class="col-md-3">
<img src="img/img7.png" width="75px" height="75px" class="img-responsive message-icons">
Save The Earth
</div>
<div class="col-md-3">
<img src="img/img8.png" width="75px" height="75px" class="img-responsive message-icons">
Build The Future
</div>
<div class="col-md-3">
<img src="img/img9.png" width="75px" height="75px" class="img-responsive message-icons">
Good For Kids
</div>
</div>
</div>
CSS
message{
font-size: 1.4em;
margin-top: 2%;
top: 2%;
}
.message-icons{
display: inline-block;
padding-right: 2%;
}
.message{
margin: 0 auto !important;
float: none !important;
}
.message-icons{
display: inline-block;
padding-right: 2%;
width: 20%;
}