In the above image, Chrome is on the left and Safari is to the right. The wrapper
(green) element in my code is being rendered with different heights in Chrome and Safari.
Other similar questions on stackoverflow direct to this stackoverflow question/answer. I applied the solution given there and added specific heights to all elements and made them display: flex
.
What do I need to do to make the wrapper
element to be rendered with the same height across Chrome and Safari ?
.block, .level-1, .super-wrapper, .wrapper, .wrapper-initial, .initial {
display: flex;
justify-content: center;
align-items: center;
}
.block {
border: 1px solid #c4c4c4;
height: 2em;
width: 4em;
}
.level-1 {
height: 3em;
}
.super-wrapper {
height: 3em;
font-size: 0.4em;
}
.wrapper {
background-color: #8fbc8f;
height: 3em;
width: 3em;
}
.wrapper-initial {
height: 2em;
}
.initial {
height: 2em;
}
<div class="block">
<div class="level-1">
<div class="super-wrapper">
<div class="wrapper">
<div class="wrapper-initial">
<div class="initial">X</div>
</div>
</div>
</div>
</div>
</div>