body{ display: flex; justify-content: space-between; font-family: sans-serif; } .left{ height: 100%; width: 75%; background: white; } .right{ height: 100%; width: 25%; background: green; border-left: 2px solid rgba(0, 0, 0, 0.5); min-width: 300px; } .top_bar{ height: 60px; display: flex; background: linear-gradient(0deg, #bbb, #ddd); flex-direction: row-reverse; align-content: center; align-items: center; border-bottom: 2px solid rgba(0, 0, 0, 0.15); } .top_bar label{ margin-right: 20px; font-size: 25px; font-family: cursive; } .main_box{ height: Calc(100% - 120px); background: radial-gradient(#fff, #fff, #fff, #eee, #eee); display: grid; direction: rtl; box-sizing: border-box; padding: 20px; align-content: start; grid-gap: 10px; overflow: auto; } .bottom_bar{ height: 60px; background: linear-gradient(0deg, #bbb, #ddd); box-sizing: border-box; padding: 8px; border-top: 2px solid rgba(0, 0, 0, 0.15); } .bottom_bar button{ height: 40px; width: 40px; background: rgba(220, 220, 220); border-radius: 50%; outline: none; border: 1px solid rgba(0, 0, 0, 0.2); font-size: 20px; line-height: 35px; font-family: emoji; cursor: pointer; } .bottom_bar button:hover{ background: rgba(200, 200, 200); } .bottom_bar button:active{ background: rgba(190, 190, 190); } .bottom_bar input#newmsg_text{ height: 100%; width: Calc(100% - 100px); background: transparent; border: 0px; outline: none; padding: 10px; font-size: 20px; resize: none; display: inline-table; } .msg_bubble{ height: fit-content; display: flex; flex-direction: row; flex-wrap: nowrap; align-items: flex-end; padding-bottom: 10px; } .msg_bubble.incoming{ direction: ltr;; } .profile_photo{ height: 50px; width: 50px; background: royalblue; border-radius: 50%; text-align: center; line-height: 45px; font-size: 25px; color: white; min-width: 50px; min-height: 50px; } .msg_bubble.incoming .profile_photo{ background: darkolivegreen; color: white; } .msg_bubble .msg_body{ margin-right: 15px; margin-left: 15px; max-width: Calc(100% - 130px); font-size: 20px; background: honeydew; padding: 10px; border-radius: 15px; box-sizing: border-box; direction: rtl; } .msg_bubble.incoming .msg_body{ background: aliceblue; } .msg_bubble .msg_body p{ display: contents; } .msg_bubble .msg_body span{ position: relative; top: -10px; color: royalblue; } .msg_bubble.incoming .msg_body span{ color: darkolivegreen; } *{ user-select: none; } p{ user-select: all; } body.mobile-ui .left{ width: 100% } body.mobile-ui .top_bar{ height: 180px; } body.mobile-ui .top_bar label{ font-size: 75px; } body.mobile-ui .main_box{ height: Calc(100% - 360px); } body.mobile-ui .profile_photo{ height: 100px; width: 100px; font-size: 50px; line-height: 90px; } body.mobile-ui .msg_bubble .msg_body{ font-size: 60px; } body.mobile-ui .bottom_bar{ height: 180px; } body.mobile-ui .bottom_bar button{ font-size: 60px; width: 120px; height: 120px; } body.mobile-ui .bottom_bar input#newmsg_text{ width: Calc(100% - 250px); font-size: 60px; } body.mobile-ui .right{ display: none; } body.mobile-ui .is-typing.main_box { height: Calc((100% - 360px) / 3) !important; transition: .2s; }