I have two classes and I need to make their the elements same height. As the children element's height is increased, the parent element also needs its height to be increased.
Parent element class is .user-data
and children element class is .scheduleWorkingPeriodContainer
.
.user-data {
position: relative;
float: left;
box-sizing: border-box;
min-height: 40px;
align-items: center;
text-align: center;
border-left: 1px solid #d0d0d0;
border-bottom: 1px solid #d0d0d0;
background-color: white;
}
.scheduleWorkingPeriodContainer {
position: absolute;
z-index: 1;
width: 100%;
display: block;
overflow-x: hidden;
height: auto;
}
Parent and children element need to have same class and I also cannot change the position
property in .user-data
and .scheduleWorkingPeriodContainer
due to code not shown here.
Can someone help?