Currently, I am working on a website using HTML and CSS.
I have created a division element and applied a class to it called profile_pic. However, when I make changes to this class in the CSS file, it does not reflect on the div. It seems like the styling is not being applied to the div with that specific class and I'm unsure of the reason behind it.
Interestingly, if I use the same class within an image tag, then the changes are visible. But as soon as I move the class back to the original div element, the style changes disappear. Can someone please shed some light on what might be happening here?
.profile_pic {
width: 50px;
height: 50px;
object-fit: cover;
border-radius: 25px;
display: inline-block;
}
<div class="profile_pic">
<img src="https://via.placeholder.com/100">
</div>
<div>
<img class="profile_pic" src="https://via.placeholder.com/100">
</div>