html - Same column height with content inside -
today faced css problem. had issue 2 columns haven't same height because of contents , depending on screen resolution . set height of columns 650px .
except , according resolution , button or content out of column (as height of latter fixed).
ideas solve problem?
ps : use bootstrap .
<article class="section-wrapper clearfix" id="rejoindre"> <div class="content-wrapper clearfix"> <div class="col-sm-12 col-md-12"> <!-- titre --> <h1 class="text-center">vous aussi rejoignez l'aventure !</h1> <div class="col-sm-6 col-md-6"> <div class="thumbnail" style="height : 650px;"> <img alt="..." src= "assets/images/other_images/section_rejoindre/btn_decouverte.png"> <div class="caption"> <h3 class="text-center">nimeria demo</h3> <p class="text-center">le mode découverte est un module qui vous permet d'essayer sans candidature une partie des ajouts exclusifs de niméria.</p> <ul class="pull-left"> <li>sans candidature(sauf bêta)</li> <li>inscription rapide</li> <li>reset de la map</li> <li>accès au système de quête</li> </ul> <div class="clearfix"></div> <p class="text-center"><a class= "btn btn-primary btn-lg" href= "http://91.121.160.218/oldforum/forums/candidatures-postulez-pour-la-beta.193/" style= "border-radius: 5px; background:#597a78;">s'inscrire et jouer !</a></p> </div> </div> </div> <div class="col-sm-6 col-md-6"> <div class="thumbnail" style="height : 650px;"> <img alt="..." src= "assets/images/other_images/section_rejoindre/btn_world.png"> <div class="caption"> <h3 class="text-center">nimeria world</h3> <p class="text-center">niméria world est le serveur original qui vous propose toutes les fonctionnalités et ajouts inédits qui font le succès du projet.</p> <div class="pull-left"> <ul> <li>sous candidature</li> <li>création du personnage</li> <li>choix d'une nation</li> <li>présence des saisons</li> </ul> </div> <div class="clearfix"></div> <p class="text-center"><a class= "btn btn-primary btn-lg" href= "http://91.121.160.218/oldforum/" style= "border-radius: 5px; background:#597a78;">bientôt disponible</a></p> </div> </div> </div> <div></div><!-- .content-wrapper --> </div> </div> </article><!-- .section-wrapper -->
you can use display: flex
force siblings of container have same height.
html:
<div id="container"> <div class="box">lorem ipsum...</div> <div class="box">lorem ipsum</div> <div class="box">lorem ipsum</div> <div class="box">lorem ipsum</div> </div>
css:
#container { display: flex; flex-direction: row; } .box { padding: 20px; background-color: red; margin-right: 20px; width: 200px; }
in case display:flex
should used on parent container boxes should have same height.
the flexbox only partially supported in ie 10 , not supported in ie 9 , below. please consider if expect have major part ie users.
Comments
Post a Comment