0

Here are my code:

<div class="box">
    <div class="test"></div>
</div>

.box {
    height: 100%;
    width: 100px;
    background: red;
}

.test {
    background: blue;
    height: calc(100% - 47px);
}

When I set height: 100% then calc() not working properly. But when I set height:500px then calc() works fine.

How it's possible? and how can I solve this bug?

Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271

0 Answers0