我正在構建一個基於瓷磚的組合,Wordpress主題,我不能讓瓷磚正確居中在他們的父div。 Here's the static page(我正在從.cu.cc asap遷移)。我用inline-block
對齊全部將它們放在一排,並有margin
風格保持瓷磚之間的差距,但什麼我得到是這樣的(紅線補充):CSS內聯塊固定寬度的瓷磚
我想要將瓷磚對齊到紅線 - 我該怎麼做?
這裏是HTML的歸結版本:
<div class="content-wrapper">
<div class="tile"></div>
<div class="tile"></div>
<div class="tile"></div>
</div>
而CSS:
.content-wrapper{
width: 678px;
margin-top: 66px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
.tile{
display:inline-block;
width: 182px;
height: 295px;
background-color: #e1e1e1;
border: solid 1px rgba(176,176,176,0);
margin-bottom: 64px;
margin-right: 35px
}
感謝,奧利弗
你能增加瓷磚的右邊距嗎? –
@Explosion Pills這是我會想到的,但它進一步擾亂了一切。 – OliverW