*{ box-sizing: border-box; margin: 0; } body{ padding-top: 20px; } .container{ position: relative; padding: 20px; border-radius: 5px; margin: 0 auto; // height: 660px; width: 600px; background: url("../img/1626160774_64.jpg") center center/cover no-repeat; .wrapper-messages{ display: flex; flex-direction: column-reverse; height: 500px; width: 100%; margin-bottom: 20px; overflow-y: scroll; &::-webkit-scrollbar { width: 0 !important } .wrap-message{ display: flex; justify-content: space-between; align-items: flex-start; margin: 10px 0; .nick{ padding: 5px 10px; text-align: center; background-color: white; min-height: 30px; border-radius: 3px; font-size: 16px; margin-right: 30px; } .message{ position: relative; padding: 5px 10px; border-radius: 0px 3px 3px 3px; font-size: 16px; text-align: center; background-color: white; position: relative; min-height: 30px; &:before{ content: ""; position: absolute; width: 20px; height: 20px; background-color: rgb(255, 255, 255); left: -19px; top: 0px; clip-path: polygon(75% 0, 100% 0, 100% 100%, 98% 82%, 97% 71%, 96% 61%, 94% 50%, 92% 40%, 90% 31%, 87% 21%, 84% 13%, 80% 6%); } .mes-time{ text-align: right; font-size: 10px; color: cadetblue; } } } } .wrapper-form{ position: relative; width: 100%; min-height: 50px; background-color: rgb(255, 255, 255); border-radius: 10px; .nick-inp, .message-inp{ margin-left: 20px; font-size: 16px; display: block; border: none; width: 400px; height: 40px; outline: none; } img{ position: absolute; width: 30px; height: 30px; right: 10px; bottom: 10px; } } } .hr{ background-color: rgb(226, 226, 226); width: 85%; margin-left: 20px; height: 1px; } .mes-date{ text-align: center; color: rgb(219, 219, 219); }