html, body { height: 100%; margin: 0; } #selitys { margin-bottom: 7em; text-align: center; font-size: 10px; font-family: Arial, sans-serif; color: #1e8c5d; max-width: 60%; background-color: #dceee5; padding: 3px; padding-left: 12px; padding-right: 12px; border: 2px solid #6fd2a8; border-radius: 30px; } .kielen_nimi { font-weight: bold; font-family: Arial, sans-serif; padding-top: 0.3em; font-size: 36px; color: #102f21; } .bottom_filler { height: 1.5em; margin-bottom: 1em; } #message-box, #result-box { display: flex; justify-content: space-between; align-items: center; flex-direction: column; border: 2px solid #3b6b56; border-radius: 10px; background-color: #9bcbb6; } #message, #result { width: 100%; height: 50%; max-height: 50%; max-width: 100%; min-height: 50%; min-width: 100%; padding: 1em; border: none; background-color: #acdac6; box-sizing: border-box; overflow-y: scroll; white-space: normal; overflow-wrap: break-word; display: inline-block; font-family: Arial, sans-serif; font-size: 1em; resize: none; } #message:focus { outline: none !important; border: none; box-shadow: none; } #message::-webkit-resizer { display: none; } body { display: flex; align-items: center; justify-content: space-between; flex-direction: column; margin: 1px; } .container { flex-direction: row; display: flex; justify-content: center; align-items: center; width: 70%; height: 40%; box-sizing: border-box; margin-top: 5em; margin-bottom: 5em; } .image { max-height: 300px; width: 15%; flex-shrink: 0; box-sizing: border-box; margin: 0 1.5em; /* Add margin here */ } .child { max-height: 600px; width: 45%; height: 100%; flex-shrink: 0; box-sizing: border-box; margin: 0 2.5em; /* Add margin here */ } @keyframes bounce { 0% { transform: translateY(0); } 45% { transform: translateY(-20px); } 90% { transform: translateY(5px); } 100% { transform: translateY(0); } } .bounce { animation: bounce 0.5s infinite; } button { background-color: #4CAF50; /* Green */ border: none; color: white; padding: 16px 24px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; line-height: 0.1; border-radius: 20px; } @media screen and (max-width: 1000px) { .kielen_nimi { font-size: 25px; } .child { margin: 0 1.5em; } } @media screen and (max-width: 700px) { .kielen_nimi { font-size: 16px; } .child { margin: 0 1em; } .image { margin: 0 0.5em; } } @media screen and (max-width: 500px) { .kielen_nimi { font-size: 12px; } .child { margin: 0 1em; } .image { margin: 0 0.5em; } } @media screen and (max-height: 400px) { button { font-size: 14px; padding: 8px 12px; } #message, #result { background-color: transparent; } }