'I want to know why this table will go out of the form [duplicate]

enter image description here

The top border of table has gone out of the form border (which is the border of blue background color) enter image description here

form {
    margin-top: 100px;
    margin-left: 20%;
    width: 60%;
    background-color: #F0FFFF;
}

table {
    width: calc(100% - 20px);
    margin: 10px;
    text-align: center;
    border-collapse: collapse;
    border-style: none;
}


Solution 1:[1]

idk just replace table margin: 10px with form padding: 10px

and change table width: calc(100% - 20px); to table width: 100%;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 1900011604