2015-11-30 7 views
5

पर सीएसएस डीआईवी इनलाइन bottom पर inline डालने के लिए मेरे पास 3 डिवीजन हैं। मुझे नहीं पता कि यह कैसे करें ... कोई भी मेरी मदद कर सकता है?नीचे

उम्मीद उत्पादन: enter image description here

कोड मैं कोशिश की है:

.feature-description 
 
{ 
 
    margin-top: 20px; 
 
    padding-left:10%; 
 
    padding-right:10%; 
 
} 
 
.start-up-phase 
 
{ 
 
    background-color: #a82327; 
 
    color: #fff; 
 
    padding: 13px 22px 100px; 
 
    text-align: justify; 
 
    width:86%; 
 
    margin-left:auto; 
 
    margin-right:auto; 
 
    min-height:350px; 
 
} 
 
.growth-phase 
 
{ 
 
    background-color: #196b8c; 
 
    color: #fff; 
 
    padding: 13px 22px 110px; 
 
    text-align: justify; 
 
    width:86%; 
 
    margin-left:auto; 
 
    margin-right:auto; 
 
    min-height:450px; 
 
} 
 
.expansion-phase 
 
{ 
 
    background-color: #53752f; 
 
    color: #fff; 
 
    padding: 13px 22px 200px; 
 
    text-align: justify; 
 
    width:86%; 
 
    margin-left:auto; 
 
    margin-right:auto; 
 
} 
 
.phase-title 
 
{ 
 
    border-bottom: 1px solid #fff; 
 
    padding-bottom:10px; 
 
} 
 
.phase-content 
 
{ 
 
    padding-top:5px; 
 
}
<!-- Latest compiled and minified CSS --> 
 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> 
 

 
<!-- Optional theme --> 
 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous"> 
 

 
<!-- Latest compiled and minified JavaScript --> 
 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> 
 
<div class="container"> 
 
<div class="row feature-description"> 
 
    <div class="col-lg-4"> 
 
    <div class="start-up-phase"> 
 
     <h4 class="phase-title"> 
 
     <strong>START UP PHASE</strong> 
 
     </h4> 
 
     <div class="phase-content"> 
 
     Startup phase is very crucial as reseller develop their first business partners group and hands on learning about their business culture, products and other important skills with the support of the leaders. At this point, reseller will get the most from own effort and rewarded from the initial group development. 
 
     <?php load_helper('html'); echo br(4) ?> 
 
     <p> 
 
      High Margin Retail Opportunities, Personal Residual Income, Introducer Bonus and Group Placement Incentive dedicated for reseller in this phase. 
 
     </p> 
 
     </div> 
 
    </div> 
 
    </div> 
 
    <div class="col-lg-4"> 
 
    <div class="growth-phase"> 
 
     <h4 class="phase-title"> 
 
     <strong>START UP PHASE</strong> 
 
     </h4> 
 
     <div class="phase-content"> 
 
     Startup phase is very crucial as reseller develop their first business partners group and hands on learning about their business culture, products and other important skills with the support of the leaders. At this point, reseller will get the most from own effort and rewarded from the initial group development. 
 
     </div> 
 
    </div> 
 
    </div> 
 
    <div class="col-lg-4"> 
 
    <div class="expansion-phase"> 
 
     <h4 class="phase-title"> 
 
     <strong>START UP PHASE</strong> 
 
     </h4> 
 
     <div class="phase-content"> 
 
     Startup phase is very crucial as reseller develop their first business partners group and hands on learning about their business culture, products and other important skills with the support of the leaders. At this point, reseller will get the most from own effort and rewarded from the initial group development. 
 
     </div> 
 
    </div> 
 
    </div> 
 
</div> 
 
    </div>

+0

मुझे लगता है, आप ऊर्ध्वाधर- align आवेदन करना होगा कि: उन divs में से प्रत्येक के नीचे आप नीचे होना चाहते हैं, लेकिन सिर्फ एक सुझाव है। – pavon147

उत्तर

4

आप मीडिया के प्रश्नों के साथ flexbox उपयोग कर सकते हैं इस https://jsfiddle.net/2Lzo9vfc/227/

@media(min-width: 1200px) { 
    .row.feature-description { 
     display: -webkit-flex; 
     display: flex; 
     -webkit-align-items: flex-end; 
     align-items: flex-end; 
    } 
} 
+0

यह मेरे लिए काम करता है। मैं इसे स्वीकृत उत्तर के रूप में चुनता हूं। – Nere

+0

कूल मुझे लगता है कि यह आपकी समस्या के लिए सबसे अच्छा समाधान है। –

+1

समस्या इस दृष्टिकोण के साथ है। ब्राउज़रों के आसपास फ्लेक्स समर्थन बहुत अलग है। http://caniuse.com/#feat=flexbox आपको विभिन्न कोडों में अपने कोड का पूरी तरह से परीक्षण करना चाहिए। – HerrSerker

1

दुर्भाग्य से, उसकी ग्रिड प्रणाली के लिए बूटस्ट्रैप उपयोग नाव। तो ऊर्ध्वाधर-संरेखण लागू करने के लिए थोड़ा मोटा है। आप अपना परिणाम प्राप्त करने के लिए डिस्प्ले का उपयोग करने के लिए चुन सकते हैं: इनलाइन-ब्लॉक या डिस्प्ले: तालिका (डिस्प्ले के साथ: बच्चों पर टेबल-सेल)। फिर आपको केवल एक लंबवत-संरेखण निर्दिष्ट करना होगा: नीचे।

1

आप display:inline-block उपयोग कर सकते हैं और भूल नहीं है remove the extra spaces जिसके द्वारा display:inline-block

.col-lg-4 { 
    display: inline-block; 
    vertical-align: bottom; 
    float:none; 
} 

Jsfiddle

+0

मैंने आपका कोड आजमाया था। अभी भी समस्या आई है ... आखिरी ब्लॉक नीचे जाना। – Nere

+0

जैसा कि मैंने बताया था, आप इसे हल कर सकते हैं, आपको अतिरिक्त रिक्त स्थान हटा देना चाहिए। [यह] जांचें (https://css-tricks.com/fighting-the-space-between-inline-block-elements/) @Imran – Alex

1

यह करने के लिए occuered है बूटस्ट्रैप के साथ भी नीचे जाने के लिए इसे ठीक करें।

.feature-description 
{ 
    align-items: flex-end; 
    display: flex; 
} 

यह एक सीढ़ी की तरह लग रहे आप padding

.start-up-phase 
{ 
    padding: 13px 22px; 
} 

.growth-phase 
{ 
    padding: 13px; 
} 

.feature-description { 
 
    margin-top: 20px; 
 
    padding-left: 10%; 
 
    padding-right: 10%; 
 
    align-items: flex-end; 
 
    display: flex; 
 
} 
 
.start-up-phase { 
 
    background-color: #a82327; 
 
    color: #fff; 
 
    padding: 13px 22px; 
 
    text-align: justify; 
 
    width: 86%; 
 
    margin-left: auto; 
 
    margin-right: auto; 
 
    min-height: 350px; 
 
} 
 
.growth-phase { 
 
    background-color: #196b8c; 
 
    color: #fff; 
 
    padding: 13px; 
 
    text-align: justify; 
 
    width: 86%; 
 
    margin-left: auto; 
 
    margin-right: auto; 
 
    min-height: 450px; 
 
} 
 
.expansion-phase { 
 
    background-color: #53752f; 
 
    color: #fff; 
 
    padding: 13px 22px 200px; 
 
    text-align: justify; 
 
    width: 86%; 
 
    margin-left: auto; 
 
    margin-right: auto; 
 
} 
 
.phase-title { 
 
    border-bottom: 1px solid #fff; 
 
    padding-bottom: 10px; 
 
}
<!-- Latest compiled and minified CSS --> 
 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> 
 

 
<!-- Optional theme --> 
 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous"> 
 

 
<!-- Latest compiled and minified JavaScript --> 
 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> 
 

 
<div class="container"> 
 
    <div class="row feature-description"> 
 
    <div class="col-lg-4"> 
 
     <div class="start-up-phase"> 
 
     <h4 class="phase-title"><strong>START UP PHASE</strong></h4> 
 
     <div class="phase-content"> 
 
      Startup phase is very crucial as reseller develop their first business partners group and hands on learning about their business culture, products and other important skills with the support of the leaders. At this point, reseller will get the most from 
 
      own effort and rewarded from the initial group development. 
 
      <?php load_helper('html'); echo br(4) ?> 
 
      <p> 
 
      High Margin Retail Opportunities, Personal Residual Income, Introducer Bonus and Group Placement Incentive dedicated for reseller in this phase. 
 
      </p> 
 
     </div> 
 
     </div> 
 
    </div> 
 
    <div class="col-lg-4"> 
 
     <div class="growth-phase"> 
 
     <h4 class="phase-title"> 
 
     <strong>START UP PHASE</strong> 
 
     </h4> 
 
     <div class="phase-content"> 
 
      Startup phase is very crucial as reseller develop their first business partners group and hands on learning about their business culture, products and other important skills with the support of the leaders. At this point, reseller will get the most from 
 
      own effort and rewarded from the initial group development. 
 
     </div> 
 
     </div> 
 
    </div> 
 
    <div class="col-lg-4"> 
 
     <div class="expansion-phase"> 
 
     <h4 class="phase-title"> 
 
     <strong>START UP PHASE</strong> 
 
     </h4> 
 
     <div class="phase-content"> 
 
      Startup phase is very crucial as reseller develop their first business partners group and hands on learning about their business culture, products and other important skills with the support of the leaders. At this point, reseller will get the most from 
 
      own effort and rewarded from the initial group development. 
 
     </div> 
 
     </div> 
 
    </div> 
 
    </div>

+0

हाँ .. यह काम करता है लेकिन छोटे स्क्रीन आकार पर समस्याएं।मीडिया प्रश्नों के साथ – Nere

+0

आप कह सकते हैं कि इसे 'डिस्प्ले: फ्लेक्स' और 'संरेखण-आइटम: फ्लेक्स-एंड' बिज़ को 'डिस्प्ले: ब्लॉक' और 'align.items' पर सेट करना चाहिए: – Max

0

बदलना चाहिए यहाँ नीचे सभी div के डाल करने के लिए समाधान है बनाने के लिए।

.feature-description 
{ 
    margin-top: 20px; 
    padding-left:10%; 
    padding-right:10%; 
    position: relative; 
} 
.start-up-phase, .growth-phase, .expansion-phase{ 
     bottom: 0; 
} 

अपने सीएसएस जारी रखें:

.start-अप चरण {...

संबंधित मुद्दे