.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>
मेरा प्रश्न HERECSS में चिह्नित लाइन के सापेक्ष है । मुझे पता चला कि पंक्तियाँ एक-दूसरे के बहुत पास हैं, इसलिए मैंने उन्हें अलग करने के लिए नीचे का मार्जिन जोड़ने की कोशिश की। दुर्भाग्य से यह काम नहीं करता है। मुझे पंक्तियों को अलग करने के लिए तालिका कोशिकाओं में मार्जिन जोड़ना होगा।
इस व्यवहार के पीछे क्या कारण है?
इसके अलावा, लेआउट बनाने के लिए इस रणनीति का उपयोग करना ठीक है जैसा कि मैं कर रहा हूं:
[icon] - text [icon] - text
[icon] - text [icon] - text
या कोई बेहतर रणनीति है?