Answer the question
In order to leave comments, you need to log in
How can I set the height of the parent div to the child div?
How can I make divs with class services-box-bg take the height of the parent container? Why doesn't height: 100%; work?
HTML code:
<div class="row services-box">
<div class="col-md-4">
<div class="services-box-bg">
<p>Текст</p>
</div>
</div>
<div class="col-md-4">
<div class="services-box-bg">
<p>Текст</p>
</div>
</div>
<div class="col-md-4">
<div class="services-box-bg">
<p>Текст</p>
</div>
</div>
</div>
.services-box{
padding-top: 10px;
padding-bottom: 15px;
margin-top: 5px;
margin-bottom: 5px;
}
.services-box p{
text-align: center;
margin-top: 10px;
}
.services-box-bg{
background-color: #b4b4b4;
margin: 10px;
padding: 20px;
height: 100%;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question