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%); } div { background: white; } main { position: absolute; max-height: calc(100% - 140px); overflow-y: auto; width: 50%; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); padding: 20px; border-radius: 10px; background: white; } input, button, select { width: 100%; } img { max-width: 80%; max-height: 80%; } @media only screen and (max-width: 600px) { main { width: calc(100% - 20%); } } #student-list li { cursor: pointer; } #student-list li:hover { opacity: 0.8; } #user h1 { cursor: pointer; } #user h1:hover { opacity: 0.8; } #comments div { display: flex; flex-flow: row wrap; justify-content: space-between; } #comments h1 { cursor: pointer; } #comments h1:hover { opacity: 0.8; } #comments .edit-btn, #comments .delete-btn, #comments .add-btn { cursor: pointer; } #comments .edit-btn:hover, #comments .delete-btn:hover, #comments .add-btn:hover { opacity: 0.8; } #comments #add-div { justify-content: center; } #comments #add-div div { width: 100%; } #comments #add-div div textarea { width: 100%; height: 80%; }