I've found that you determine div product_conclusion's height and use display:block
Your problem is this:
- Your parent's
<div>
, in this case is <div class="product_conclusion">
's height did not respond its child's height.
To solve this problem:
- Simply add
display:inline-block
or display:table
on <div class="conclusion_about">
- Remove all
height: n-px
on your CSS, that will make your div can't expand more than that, or maybe you want to use min-height:n-px
instead (Documentation source below)
- Remove this CSS below (Because again, you don't want to determine the height) and your bottom will block the ca-text class of product_conclusion
//Try removing this
@media only screen and (max-width: 1140px) {
.product_conclusion {
height: calc(100% - 30px);
}
.product_conclusion:after {
height: 150px;
bottom: -145px;
}
}
This is my CSS source code
<style>
/*PRODUCT CONCLUSION*/
.product_conclusion p {
margin: 0;
}
.product_conclusion {
background-image: url(https://www.changedwards.com/wp-content/uploads/2018/02/white-brick-15.jpg);
background-repeat: no-repeat;
background-size: cover;
position: relative;
//height: 800px; //Removed
}
.product_conclusion:before {
content: '';
display: block;
position: absolute;
width: 100%;
background-color: transparent;
background-size: cover;
z-index: 1;
height: 240px;
top: -239px;
background-image: url(https://www.changedwards.com/wp-content/uploads/2018/06/white-brick-15_bottom-e1529272154540.png);
}
.product_conclusion:after {
content: '';
display: block;
position: absolute;
width: 100%;
background-color: transparent;
background-size: cover;
z-index: 1;
height: 240px;
bottom: -235px;
background-image: url(https://www.changedwards.com/wp-content/uploads/2018/06/white-brick-15_top.png);
}
.conclusion_wrap{
width: 100%;
}
.conclusion_about{
width: 85%;
margin: 0 auto;
//height: 672px; //Removed
display: inline-block; //NEW CODE or display:table;
}
.ca_text{
width:63%;
margin: 0 auto;
float: left;
padding: 3%;
}
.ca_picture{
width:37%;
margin: 0 auto;
float: left;
padding: 3%;
}
.ca_picture img{
float: 0 auto;
}
.ca_text button {
margin-top: 25px;
width: 150px;
font-size: 15px;
z-index: 999;
}
#instagram {
background-color: #bc2a8d;
}
#facebook {
background-color: #4F81BD;
}
#ca_picture_media {
display: none;
}
@media only screen and (max-width: 1140px) {
.product_conclusion {
//height: calc(100% - 30px); //Remove
}
.product_conclusion:after {
//height: 150px; //Remove
//bottom: -145px; //Remove
}
}
@media only screen and (max-width: 960px) {
.ca_picture{
display: none;
}
#ca_picture_media {
display: block;
float: right;
width: 35%;
padding: 0 0 15px 15px;
}
.ca_text{
width:100%;
}
}
@media only screen and (max-width: 480px) {
.ca_text, .ca_picutre {
width:100%;
float: none;
}
}
/*PRODUCT CONCLUSION END*/
</style>
Solution Source:
Div parent not responding to child's height: How to make div not larger than its contents?
min-height CSS: https://www.w3schools.com/cssref/pr_dim_min-height.asp
Hope this will solve your problem.