2016-03-23 16 views
0

Ich möchte die Höhe von 2 divs erhöhen, die zueinander parallel sind, zum Beispiel linke Spalte hat weniger Inhalt und Recht hat mehr Inhalt, aber was ich will beide sollten gleiche Höhe haben als linke hat einen Hintergrund:Bootstrap: Höhe von 2 parallelen divs in einer Reihe erhöhen

<div class="container"> 
    <div class="row"> 
    <div class="col-md-4 col-sm-4 col-xs-12" style="background:red;"> 
     <p>Div with less content </p> 
    </div> 
    <div class="col-md-8 col-sm-8 col-xs-12" > 
     <p>Div with more content that without background </p> 
    </div> 
    </div> 
</div> 

brauchen Ihre Hilfe mit diesem i 3.0

Antwort

0

Bitte versuchen Sie diese Bootstrap bin mit:

<div class="container"> 
    <div class="row flex"> 
    <div class="col-md-4 col-sm-4 col-xs-12" style="background:red;"> 
     <p>Div with less content </p> 
    </div> 
    <div class="col-md-8 col-sm-8 col-xs-12" > 
     <p>Div with more content that without background Div with more content that without background Div with more content that without background Div with more content that without background Div with more content that without background Div with more content that without background </p> 
    </div> 
    </div> 
</div> 

CSS:

.flex{display:flex} 
+0

Beachten Sie, dass IE Flexboxen nicht unterstützt. (http://caniuse.com/#feat=flexbox) – AlexG

+0

es funktioniert, aber gibt es eine Möglichkeit, es zu tun, wie mit bg Bild etc – Sikander

Verwandte Themen