Add image link to style in div

I’ve this code

<div class="col-sm-4 box-home" style="background-image: url('URL-IMAGE');">

        <div id="spazio" style="height:55%;"></div>

            <div class="description" id="descr-one">
            <h2><?php the_field('titolo_il_box'); ?></h2>
            <p><?php the_field('descrizione_il_box'); ?></p>
            </div>
</div>

I want to add a link to the image of background.

If I add in this mode

<a href="URL">
<div class="col-sm-4 box-home" style="background-image: url('URL-IMAGE');">

        <div id="spazio" style="height:55%;"></div>

            <div class="description" id="descr-one">
            <h2><?php the_field('titolo_il_box'); ?></h2>
            <p><?php the_field('descrizione_il_box'); ?></p>
            </div>
</div>
</a>

link all div !!

Read more here: Add image link to style in div

Leave a Reply

Your email address will not be published. Required fields are marked *