I am currently working on a website project and I would like to include my title using a background-image because it uses a unique font. In my design class, we were taught that this is the best approach. However, I am struggling with setting the correct dimensions for the background image without explicitly defining a height. How can I ensure that the background image displays at the correct size without needing to specify a height value? Thank you!
.title{
background-image: url(...);
background-repeat: no-repeat;
/*it displays nothing now, only when I add a height here*/
}
.titlespan{
visibility: hidden;
}
<h1 class="title"><span class="spantitle"></span></h1>