Inserire un blocco di testo su immagine






Codice HTML

<div class="container">
 <img src="https://www.puntoinformaticofree.it/guida_css/resources/foto/foto1.jpg" alt="Norway" style="width:100%;">
 <div class="text-block">
 <h4>Natura</h4>
 <p>Questa รจ una bellissima sorpresa</p>
 </div>
</div>


Codice CSS

 /* Container holding the image and the text */
.container {
 position: relative;
}

/* Bottom right text */ .text-block { position: absolute; bottom: 20px; right: 20px; background-color: black; color: white; padding-left: 20px; padding-right: 20px; }