I'm struggling to add images as background to a div. When I try inline styling, the background-image appears fine. However, when I attempt to use an external CSS file, the image does not show up. I have carefully checked the link and made sure that the external CSS file is properly linked. Here is the code that I have tried:
.txt-op {
background: url("assets/images/star.svg");
border-radius: 30px;
}
<div class="container text-center">
<p class="main-title">ABOUT US</p>
<div class="row">
<div class="txt-op col-sm-6">
<p>afjhaafa</p>
<p>afjhaafa</p>
<p>afjhaafa</p>
<p>afjhaafa</p>
<p>afjhaafa</p>
</div>
<div class="col-sm-6">
</div>
</div>
</div>
It seems that the issue only arises when linking the image via an external CSS file. However, other links within the same external file work perfectly fine.
Any help would be greatly appreciated!
Thanks :)