I’m working on the calculator projects and I want my calculator div’s height to fit the numberPad div which is using a grid layout. For my parent container I used the height: auto; property and it does not respond to the grid underneath… How can I fix this?
You can see the latest live version here but it does not have height: auto on calculator. However, adding the height made no difference. The SASS sheet is a bit complicated so I will post the css bellow;
https://react-calculator-freecode-camp.herokuapp.com/
@mixin calculator {
width: 100%;
margin: 4% auto;
height: auto;
width: $calculator-desktop-width;
border-radius: 5%;
box-shadow: inset 4px 2px 2px rgba(255, 255, 255, .4), inset -2px -2px 2px rgba(0, 0, 0, .4);
}
.numberPad{
@include numberPad();
grid-template-columns: $grid-width $grid-width $grid-width $grid-width;
grid-template-rows: $grid-height $grid-height $grid-height $grid-height $grid-height;
margin-top: 10%;
min-height: 36%;
}