I'm struggling to add a background image to text. I have a feeling that the issue might be related to nesting too many classes within the "div" tag, but I can't seem to solve it.
CSS:
.box {
display: flex;
top: 80px;
position: relative;
padding-top: 30px;
border: thin solid black;
}
.box1 {
padding-left: 300px;
padding-right: 30px;
width: 630px;
flex-direction: column;
align-self: flex-start;
}
.smalltitle2 {
border-bottom: medium solid black;
background-image: url("https://newbackgroundimage.com");
background-repeat: no-repeat;
}
HTML:
<div class="box">
<div class="box1">
<div class="smalltitle2">New Text with Background Image</div>
</div>
</div>