<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML</title>
<style>
.container {
width: 500px;
height: 300px;
background-color: transparent ;
box-shadow: 2px 1px 1px 1px rgba(0,0,0,0.2);
padding: 10px;
overflow: auto;
}
img {
border-radius: 50%;
height: 60px;
width: 60px;
float: left;
}
.time {
float: right;
}
.you {
background-color: #cccccc;
border-radius: 5px;
padding: 6px;
margin: 10px 0;
}
.other {
background-color: #eeeeee;
border-color: #dddddd;
border-radius: 5px;
padding: 6px;
margin: 10px 0;
}
.you:after, .other:after, .wrapper:after{
content: "";
clear: both;
display: table;
}
h2 {
text-align: center;
}
.wrapper {
background-color: green;
border-radius: 5px;
padding: 10px;
width: 500px;
}
</style>
</head>
<body>
<div class="wrapper">
<img src="https://s3.ap-south-1.amazonaws.com/s3.studytonight.com/tutorials/uploads/pictures/1628591248-101156.png" >
<h2> Friend</h2>
</div>
<div class="container">
<div class="you">
<p> hi</p>
<span class="time">10:00</span>
</div>
<div class="other">
<p> Hello!!! </p>
<span class="time">12:01</span>
</div>
<div class="you">
<p> wats up</p>
<span class="time">12:03</span>
</div>
<div class="other">
<p> I am fine </p>
<span class="time">12:10</span>
</div>
</div>
</body>
</html>