.container {
width: 850px;
padding: 0;
display: table;
margin-left: auto;
margin-right: auto;
}
.row {
display: table-row;
margin-bottom: 30px;
/* HERE */
}
.home_1 {
width: 64px;
height: 64px;
padding-right: 20px;
margin-right: 10px;
display: table-cell;
}
.home_2 {
width: 350px;
height: 64px;
padding: 0px;
vertical-align: middle;
font-size: 150%;
display: table-cell;
}
.home_3 {
width: 64px;
height: 64px;
padding-right: 20px;
margin-right: 10px;
display: table-cell;
}
.home_4 {
width: 350px;
height: 64px;
padding: 0px;
vertical-align: middle;
font-size: 150%;
display: table-cell;
}
<div class="container">
<div class="row">
<div class="home_1"></div>
<div class="home_2"></div>
<div class="home_3"></div>
<div class="home_4"></div>
</div>
<div class="row">
<div class="home_1"></div>
<div class="home_2"></div>
</div>
</div>
คำถามของฉันสัมพันธ์กับบรรทัดที่ทำเครื่องหมายไว้ HERE
ใน CSS ฉันพบว่าแถวนั้นอยู่ใกล้กันเกินไปฉันจึงพยายามเพิ่มระยะขอบล่างเพื่อแยกออก น่าเสียดายที่มันไม่ทำงาน ฉันต้องเพิ่มระยะขอบให้กับเซลล์ตารางเพื่อแยกแถว
อะไรคือเหตุผลเบื้องหลังพฤติกรรมนี้
นอกจากนี้ยังสามารถใช้กลยุทธ์นี้เพื่อจัดวางเค้าโครงขณะที่ฉันกำลังทำอยู่ได้หรือไม่:
[icon] - text [icon] - text
[icon] - text [icon] - text
หรือมีกลยุทธ์ที่ดีกว่านี้ไหม