Fix for the chat box going out of bounds

This commit is contained in:
twanariens 2021-03-10 15:23:08 +01:00
commit 27452c04e2
2 changed files with 21 additions and 7 deletions

View file

@ -6,13 +6,15 @@
<p>{{user}}</p>
</div>
</div>
<div class="chatbox__messages" *ngFor="let m of messages">
<div class="chatbox__messages__user-message">
<div class="chatbox__messages__user-message--ind-message" [ngClass]="{'sender': m.chatType === ChatType.Sender, 'reciever':m.chatType === ChatType.Reciever }">
<p class="name" *ngIf="m?.username">{{m.username}}</p>
<br/>
<p class="message">{{m.message}}</p>
<p class="timestamp">{{m.date | amLocal | amDateFormat: 'l LT'}}</p>
<div class="chatbox-message-box">
<div class="chatbox__messages" *ngFor="let m of messages">
<div class="chatbox__messages__user-message">
<div class="chatbox__messages__user-message--ind-message" [ngClass]="{'sender': m.chatType === ChatType.Sender, 'reciever':m.chatType === ChatType.Reciever }">
<p class="name" *ngIf="m?.username">{{m.username}}</p>
<br/>
<p class="message">{{m.message}}</p>
<p class="timestamp">{{m.date | amLocal | amDateFormat: 'l LT'}}</p>
</div>
</div>
</div>
</div>

View file

@ -195,6 +195,18 @@ html,body {
:-ms-input-placeholder {
color: rgba(255, 255, 255, 0.9);
}
.chatbox-message-box{
height: 90%;
width: 75%;
position: relative;
overflow-y: scroll;
display:flex;
flex-direction:column-reverse;
}
.chatbox__user-list p{
font-size:12px;
}
// ::-webkit-scrollbar {
// width: 4px;