Box-sizing: Missing indent on the right and bottom with width and height 100% — is this normal?

Please tell me, trying to make a DIV on the entire page area with a fixed indentation without the use percent. Faced with the fact that the indent on the left and top displays correctly, and the right and bottom is not.
Code:


 <meta charset="UTF-8">
<style>
*{
 margin: 0;
 padding: 0;
}
body{
 height: 100%;
}
.wrap{
 position: fixed;
 width: 100%;
 height: 100%;
 background-color: grey;
 margin: 10px;
 box-sizing: border-box;
}
 </style> 


<div class="wrap">
hello
</div> 


f0c7456b0e344814827872f2f85db826.jpg
This is normal behavior for box-sizing ?
https://jsfiddle.net/bL7fyfsk/1/
July 2nd 19 at 17:55
3 answers
July 2nd 19 at 17:57
Solution
.wrap{
 position: fixed;
 width: calc(100% - 20px);
 height: calc(100% - 20px);
 background-color: grey;
 margin: 10px;
 box-sizing: border-box;
}
July 2nd 19 at 17:59
margin is not included in border-box... and indeed it will not enter this external padding
July 2nd 19 at 18:01
timfcsm: thank you - read carefully do not included
devstudent: damn - didn't think of it - works
tried to do it through a nested div and the parent padiham and was faced with a similar situation:
*{
 margin: 0;
 padding: 0;
}
body{
 height: 100%;
}
.wrap{
 width: 100%;
 height: 100%;
 padding: 10px;
}
.cont{
 position: fixed;
 width: 100%;
 height: 100%;
 padding: 0;
 background-color: grey;
}

<div class="wrap">
 <div class="cont">
hello
</div>
</div>
fixed specific position, it is you exactly want here? - Eddie_Mil commented on July 2nd 19 at 18:04
without it, the div does not expand to the full height - nikita.Stracke commented on July 2nd 19 at 18:07
and if the content inside is more height ? he will be circumcised. try the absolute better, with less problems )) - Eddie_Mil commented on July 2nd 19 at 18:10
Do Absolut launched a div - but the padding did not appear. In this sense, they behave the same way. - nikita.Stracke commented on July 2nd 19 at 18:13
: and in other respects not the same and is easier to absolute transformations - Eddie_Mil commented on July 2nd 19 at 18:16

Find more questions by tags HTMLCSS