html, body { padding: 0; margin: 0; height: 100%; width: 100%; color: #424242; line-height: 1.6; background-color: #eec0c6; background-image: linear-gradient(315deg, #eec0c6 0%, #7ee8fa 74%); } main { position: absolute; max-height: calc(100% - 140px); overflow-y: auto; /*width: 80%;*/ width: fit-content; width: -webkit-fit-content; width: -moz-fit-content; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); padding: 20px; border-radius: 10px; background: white; } header { background: white; }