Do you want to enhance your website with interactive elements, such as a speaker description visible when hovering over an image? Below, you will find a detailed guide on how to do this.
Add an element ID for this section to ensure that the styling and functionality apply only to the selected element.
In the HTML code, locate the element representing the speaker’s photo < img >.
Below each image, add a element with the class “hover-description” that will contain the speaker’s description.
<div class="hover-description">
Here is your content.
</div>
It should look like the screenshot below:
If you want to add more than three speakers, use the “duplicate” option to add another row. Remember to replace the descriptions and images.
#speakers .column {
position: relative;
}
#speakers .column img {
display: block;
width: 100%;
height: auto;
}
.hover-description {
position: absolute;
top: 0;
left: 0;
width: 100%;
max-height: 100%;
background: rgba(0, 0, 0, 0.8);
color: #fff;
padding: 15px;
text-align:left;
box-sizing: border-box;
overflow-y: auto;
opacity: 0;
transition: opacity 0.3s ease-in-out;
pointer-events: none;
}
#speakers .column:hover .hover-description {
opacity: 1;
pointer-events: auto;
}
This way, you will add an attractive, interactive feature to your website that will grab the attention of visitors.