<div class="container">
<section class="eachmenu col-md-12 col-sm-6 col-xs-12">
<h3 id="chicken">Chicken</h3>
...
</section>
<section class="eachmenu col-md-12 col-sm-6 col-xs-12">
<h3 id="beef">Beef</h3>
...
</section>
I want to give some margins between two boxes which are located in col-sm-6 each.
I also want the length of two boxes matches well with the last col-sm-12 box.
How I can do this? If i give margins like this,
@media (min-width: 768px) and (max-width: 991px) {
section {
margin-right: 2%;
}
}
then the second box goes down..
Thanks for your support, I solved it!
<div class="container">
<h2>Our Menu</h2>
<br><br>
<div class="col-md-12 col-sm-6 col-xs-12">
<div class="eachmenu">
<h3>Chicken</h3>
...
</div>
</div>
<div class="col-md-12 col-sm-6 col-xs-12">
<div class="eachmenu">
<h3>Beef</h3>
...
</div>
</div>
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="eachmenu">
<h3>Sushi</h3>
...
</div>
</div>
</div> <!-- container-->
also changed with css file..
.eachmenu {
position: relative;
height: auto;
background-color: rgb(47, 218, 146);
float: left;
border: 1px solid black;
margin-bottom: 20px;
padding-left: 2%;
padding-right: 2%;
}
/* START SM */
@media (min-width: 768px) and (max-width: 991px) {
.eachmenu {
margin-right: 2%; => I erased it (it didn't match when 6-6-12 }
}
/* End SM */
and...
(Edited) (Erased margin-right:2% in media query => matches well now)