JSFiddle - React, Tailwind, and code Playground
by SwampFall
HTML
<div class="wrapper">
<!--<div class="aside aside_left">
<div class="titleBar">
Recent Chats
</div>
<div class="scrollbar" id="recentChats">
</div>
</div>-->
<div id="chatWindow" class="main">
<div class="titleBar" id="username">
Username
</div>
<div class="scrollbar" id="chat">
</div>
<div class="chatBar">
<input type="hidden" id="uid" value="0"/>
<input type="text" id="tbxChat" maxlength="1000" placeholder="Message..."/>
</div>
</div>
<div class="aside aside_right">
<div class="tabbar">
<div class="tabitem">
</div>
</div>
<div class="titleBar">
<input id="tbxSearch" type="text" placeholder="Search user..."/>
</div>
<div class="scrollbar" id="users">
</div>
</div>
</div>
CSS
html, body {
margin: 0px;
padding: 0px;
font-family: Verdana,sans-serif;
background: #ebf0f5;
}
.wrapper {
display: flex;
min-width: 500px;
font-size: 14px;
height: 100vh;
}
.main {
display: flex;
flex-direction: column;
min-width: 250px;
flex: 3;
padding: 5px;
}
.aside {
display: flex;
flex-direction: column;
flex: 1 0;
min-width: 150px;
max-width: 250px;
padding: 5px;
overflow-x: hidden;
}
@media all and (max-width: 700px) {
.aside {
flex-basis: 74px;
min-width: 74px;
}
}
#tbxSearch {
width: 100%;
}
.friend_chat {
display: inline-block;
width: 100%;
height: 50px;
padding: 5px;
vertical-align: middle;
word-wrap: break-word;
box-sizing: border-box;
}
.friend_chat .img img {
max-width: 40px;
max-height: 40px;
border: 0;
}
.titleBar {
font-size: 16px;
font-weight: bold;
margin: 10px;
}
.chatBar {
margin: 5px;
width: 100%;
}
#tbxChat {
width: 100%;
}
.scrollbar {
overflow-y: scroll;
}
.scrollbar::-webkit-scrollbar {
width:8px
}
::-webkit-scrollbar {
width:12px
}
::-webkit-scrollbar-track {
background:#fff;
-webkit-box-shadow: inset 1px 1px 2px #e0e0e0;
border: 1px solid #d8d8d8;
border-radius:20px
}
::-webkit-scrollbar-thumb {
background:#2f266d;
-webkit-box-shadow:inset 1px 1px 2px rgba(155,155,155,.4);
border-radius:20px
}
::-webkit-scrollbar-thumb:hover {
background:#aaa
}
::-webkit-scrollbar-thumb:active {
background:#888;
-webkit-box-shadow:inset 1px 1px 2px rgba(0,0,0,.3)
}
#username a {
color: black;
}
#users a {
display: table;
margin: 3px;
}
#users {
overflow-x: hidden;
}
span.img {
width: 50px;
height: 40px;
float: left;
}
a img {
max-width: 40px;
max-height: 40px;
font-size: 8pt;
}
a span.last_msg {
font-weight: 400;
color: #000;
font-size: 7pt;
font-style:...