Hello I am trying to design a chat room and am stuck on the css of speech bubbles.
What I want
Blue speech bubbles on the right and grey ones on the left.

At the moment
I tried several answers I found on SO like position relative/absolute. But none of the answers worked for me. If someone can help me here itd be great.

Html
<div class="card-body p-3 pt-0">
<div class="my-1 rounded-lg ">
<div class="position-relative w-100">
@foreach ($chats as $chat)
<p class="text-xs">
{{$chat->created_at}} @ {{$chat->name}}
</p>
<div class="border-0 {{ $chat->user_identifier == 'SELF' ? 'chat-bubble-send' : 'chat-bubble-receive' }}">
<p class="text-sm ">
{{ $chat->message }}
</p>
</div>
@endforeach
</div>
</div>
</div>
Css
.chat-bubble-receive p {
background: #42a5f5;
color: #fff !important;
border-radius: 20px 20px 3px 20px;
display: block;
max-width: 75%;
padding: 7px 13px 7px 13px;
}
.chat-bubble-send p {
background: #f1f1f1;
color: #000 !important;
border-radius: 20px 20px 20px 3px;
display: block;
max-width: 75%;
padding: 7px 13px 7px 13px;
position: absolute;
left: 0;
}
.card-body {
flex: 1 1 auto;
padding: 1rem 1rem;
}


