I have created a html stuff which has a parent div named as parent-portlet
. parent-portlet
class is having height
set to 40%. The html is renedering correctly but the issue is that the child div (child-fluid
) height is not getting applied to that of the parent div (parent-portlet
).
Can anyone please tell me some solution for this
My code is as given below
Html
<div class="parent-portlet">
<div class="child-fluid">
<div class="box">
<div class="box-header well">
<h2><i class="icon-bullhorn"></i> Alerts</h2>
</div>
<div class="portlet-content box-content alerts">
<div class="alert alert-error">
<strong>Oh snap!</strong> Change a few things up and try submitting again.
</div>
<div class="alert alert-success">
<strong>Well done!</strong> You successfully read this important alert message.
</div>
<div class="alert alert-info">
<strong>Heads up!</strong> This alert needs your attention, but it's not super important.
</div>
<div class="alert alert-block ">
<h4 class="alert-heading">Warning!</h4>
<p>Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p>
</div>
</div>
</div>
</div>
</div>
css
.parent-portlet {
height: 40%;
}
.portlet-content {
overflow-y: auto;
}
.child-fluid {
height: inherit;
}