Denis Fedak Denis Fedak - 1 year ago 114
CSS Question

Height 100% when parent height is auto

For example, I have following html:

<link href="css/bootstrap.css" rel="stylesheet">
<style type="text/css">
height: 300px;
height: 100% not working, how to stretch col-2 like col-1
<div class="container">
<div class="col-md-6 col-1">
<div class="col-md-6 col-2">


Height of container is auto, but actual height is defined, because col-1 height is 300px. How to set col-2 height 100% of actual parent height?

Answer Source

Maybe you should try to use "row row-eq-height" classes.

Try to use <div class="row row-eq-height"></div> instead of <div class="row"></div>

And add this CSS property to your custom CSS

  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download