Scroll in the body and the space after the block

I don't understand why there is a scroll in the body and a space after the block. According to my logic, I make the margin-bottom 100px and then subtract these 100px from the block height max-height: calc(100% - 100px);

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    * {
        padding: 0;
        margin: 0;
        box-sizing: border-box;

    body {
        height: 100%;

    .example {
        padding: 20px;
        width: 60%;
        margin: 100px auto 0;
        max-height: calc(100% - 100px);
        border: 1px solid black;
        overflow-y: scroll;

        padding: 100vh 0;

    <div class="example">
        <div class="text">


Read more here:

Content Attribution

This content was originally published by i like Cola at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: