I have a situation where I need to ensure that two classes have elements of the same height. When the children element's height increases, the parent element should also increase in height.
The parent element has the class name .user-data
and the children element has the class name .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;
}
It is essential that both the parent and children elements have the same class. Additionally, it is not possible to change the position
property in either .user-data
or .scheduleWorkingPeriodContainer
due to external code constraints.
Any assistance would be greatly appreciated!