How can I center all the contents in the page, and make the order be right-to-left, because the alignment is to the left and the order is left to right.
here is the code:
Edit Center parent div
.grid-item {
float: left;
width: 270px;
min-height: 260px;
max-height: 260px;
background-color: whitesmoke;
margin-bottom: 10px;
border: solid 5px #bfbbd9;
padding: 7px;
}
<div class="parent-div">
<a href="#">
<div class="grid-item">
<div style="height:71px">
<h2>1</h2>
</div>
</div>
</a>
<a href="#">
<div class="grid-item">
<div style="height:71px">
<h2>2</h2>
</div>
</div>
</a>
<a href="#">
<div class="grid-item">
<div style="height:71px">
<h2>3</h2>
</div>
</div>
</a>
<a href="#">
<div class="grid-item">
<div style="height:71px">
<h2>4</h2>
</div>
</div>
</a>
</div>