How to Add a Bottom Title Overlay on Image Hover in Divi 5 (Without JavaScript)

Want to make your website gallery more interactive and visually appealing? One simple way is to display a title or description at the bottom of an image when visitors hover over it.

In this tutorial, I'll show you how to create a bottom title overlay effect in Divi 5 using the standard Image and Text modules with a little custom CSS.

The effect is simple: when a visitor moves their mouse over an image, a dark overlay slides up from the bottom, revealing a white title and description. On mobile devices, the title remains visible because touchscreens do not have a traditional hover interaction.

Best of all, you don't need JavaScript or an additional plugin.

What will we create?

The finished effect includes:

  • A full-width image with rounded or square corners.
  • A subtle zoom effect when hovering.
  • A dark navy-blue overlay appearing from the bottom.
  • A white title and description.
  • A smooth sliding animation.
  • Titles that remain visible on mobile devices.

Step 1: Add an Image module in Divi 5

Open your page using the Divi Visual Builder.

  1. Add a Row and select your preferred column layout.
  2. Insert an Image module into the column.
  3. Upload or select your image from the Media Library.
  4. Open the Image module settings.
  5. Navigate to Advanced → CSS ID & Classes.
  6. Enter the following CSS class:

mcm-hover-image

Do not include the dot before the class name.

Step 2: Add a Text module for the title

Add a Text module immediately after the Image module, within the same column.

Enter your title and description. For example:

Arts & Cultural Heritage

Celebrating our culture and traditions.

Next, open the Text module settings and navigate to:

Advanced → CSS ID & Classes

Enter the following CSS class:

mcm-image-title

You can customise the title's font, size and weight using the standard Divi design settings.

Step 3: Add the custom CSS

Go to Divi → Theme Options → Custom CSS and paste the following code.

/* Image hover container */
.mcm-hover-image {
    position: relative;
    overflow: hidden;
}

/* Image transition */
.mcm-hover-image img {
    transition: transform 0.5s ease;
}

/* Zoom image slightly on hover */
.mcm-hover-image:hover img {
    transform: scale(1.06);
}

/* Title overlay */
.mcm-image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 18px 15px !important;
    background: rgba(21, 34, 56, 0.88);
    color: #FFFFFF !important;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s ease;
    z-index: 5;
}

/* Show title on hover */
.et_pb_column:has(.mcm-hover-image:hover) .mcm-image-title {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile: keep title visible */
@media (max-width: 767px) {
    .mcm-image-title {
        opacity: 1;
        transform: translateY(0);
    }
}

Save your changes and clear your website cache if necessary.

Step 4: Repeat the effect for multiple images

You can apply the same effect to as many images as you need.

For each image:

  1. Add an Image module.
  2. Assign the class mcm-hover-image.
  3. Add a Text module immediately after it.
  4. Assign the class mcm-image-title.
  5. Enter the appropriate title and description.

For a gallery with multiple images, each Image and Text module pair should be placed in its own column.

For example:

  • Arts & Cultural Heritage
  • Sports & Youth Activities
  • Family & Migrant Care
  • Community Service
  • Blood Donation Drives
  • Environmental Care

You can reuse the same CSS classes for every image. There is no need to create separate CSS for each card.

Step 5: How the effect works on mobile

Desktop visitors can reveal the title by hovering over an image.

Mobile devices do not have a traditional mouse-hover interaction. Therefore, the CSS includes a mobile media query that keeps the title visible at the bottom of each image.

This ensures visitors can see the image titles without having to tap each image.

Customisation options

You can easily change the appearance of the overlay by adjusting the CSS values.

Property Current value Purpose
Overlay colour #152238 Dark navy background
Overlay opacity 0.88 Transparency
Title colour #FFFFFF White text
Image zoom 1.06 Hover zoom amount
Animation 0.4s Overlay transition
Overlay padding 18px 15px Internal spacing

For example, to use a different overlay colour, replace:

background: rgba(21, 34, 56, 0.88);

with your preferred colour.

Troubleshooting

The title appears below the image instead of over it.

Check that the Image and Text modules are in the same Divi column and that both CSS classes are assigned correctly.

The hover effect works on one image but not another.

Check that each image has its own corresponding Text module in the same column. Avoid placing the next image between the image and its title module.

The image zooms but the title does not appear.

Check the CSS class names and make sure the CSS has been saved. Also clear any caching plugin or hosting cache.

The title is not visible on mobile.

Check that the mobile CSS media query is included and that the correct CSS class is assigned to the Text module.

Final thoughts

This is a simple way to make image galleries, portfolio pages and service cards more engaging in Divi 5.

By combining a subtle image zoom with a smooth bottom title overlay, you can create a polished visual experience without relying on JavaScript or additional plugins.

I particularly recommend this technique for portfolio galleries, community organisation websites, photography galleries and creative studio websites.

Happy designing!

/* Image hover container */
.mcm-hover-image {
position: relative;
overflow: hidden;
}

/* Image transition */
.mcm-hover-image img {
transition: transform 0.5s ease;
}

/* Zoom image slightly on hover */
.mcm-hover-image:hover img {
transform: scale(1.06);
}

/* Title overlay */
.mcm-image-title {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 18px 15px !important;
background: rgba(21, 34, 56, 0.88);
color: #FFFFFF !important;
opacity: 0;
transform: translateY(100%);
transition: all 0.4s ease;
z-index: 5;
}

/* Show title on hover */
.et_pb_column:has(.mcm-hover-image:hover) .mcm-image-title {
opacity: 1;
transform: translateY(0);
}

/* Mobile: keep title visible */
@media (max-width: 767px) {
.mcm-image-title {
opacity: 1;
transform: translateY(0);
}
}

Code box with Copy button (recommended)

You can use the following HTML, CSS and JavaScript in a Divi Code module.

CSS CODE
/* Image hover container */
.mcm-hover-image {
    position: relative;
    overflow: hidden;
}

/* Image transition */
.mcm-hover-image img {
    transition: transform 0.5s ease;
}

/* Zoom image slightly on hover */
.mcm-hover-image:hover img {
    transform: scale(1.06);
}

/* Title overlay */
.mcm-image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 18px 15px !important;
    background: rgba(21, 34, 56, 0.88);
    color: #FFFFFF !important;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s ease;
    z-index: 5;
}

/* Show title on hover */
.et_pb_column:has(.mcm-hover-image:hover) .mcm-image-title {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile: keep title visible */
@media (max-width: 767px) {
    .mcm-image-title {
        opacity: 1;
        transform: translateY(0);
    }
}

How to implement the above

  1. Open your Architact Studio blog post in Divi Visual Builder.
  2. Find the Text module containing the CSS code.
  3. Replace that code section with a Code module.
  4. Paste the complete code above.
  5. Save and test the Copy Code button on the published page.

<div class="architact-code-box">
<div class="architact-code-header">
<span>CSS CODE</span>
<button class="architact-copy-btn" type="button"
onclick="copyArchitactCode(this)">
Copy Code
</button>
</div>

<pre><code>/* Image hover container */
.mcm-hover-image {
position: relative;
overflow: hidden;
}

/* Image transition */
.mcm-hover-image img {
transition: transform 0.5s ease;
}

/* Zoom image slightly on hover */
.mcm-hover-image:hover img {
transform: scale(1.06);
}

/* Title overlay */
.mcm-image-title {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 18px 15px !important;
background: rgba(21, 34, 56, 0.88);
color: #FFFFFF !important;
opacity: 0;
transform: translateY(100%);
transition: all 0.4s ease;
z-index: 5;
}

/* Show title on hover */
.et_pb_column:has(.mcm-hover-image:hover) .mcm-image-title {
opacity: 1;
transform: translateY(0);
}

/* Mobile: keep title visible */
@media (max-width: 767px) {
.mcm-image-title {
opacity: 1;
transform: translateY(0);
}
}</code></pre>
</div>

<style>
.architact-code-box {
background: #172435;
border-radius: 9px;
overflow: hidden;
margin: 15px 0 25px;
}
.architact-code-header {
background: #26384D;
padding: 12px 16px;
display: flex;
justify-content: space-between;
align-items: center;
color: #FFFFFF;
font-size: 12px;
font-weight: 600;
letter-spacing: 1px;
}
.architact-copy-btn {
background: #D6A83B;
color: #152238;
border: 0;
border-radius: 5px;
padding: 7px 13px;
font-weight: 600;
cursor: pointer;
}
.architact-code-box pre {
margin: 0;
padding: 18px;
overflow-x: auto;
color: #E7EDF5;
font-size: 13px;
line-height: 1.65;
white-space: pre;
}
.architact-code-box code {
font-family: Consolas, Monaco, monospace;
}
</style>

<script>
function copyArchitactCode(button) {
const code = button.closest('.architact-code-box')
.querySelector('pre code').innerText;

navigator.clipboard.writeText(code).then(() => {
button.innerText = 'Copied!';
setTimeout(() => {
button.innerText = 'Copy Code';
}, 2000);
}).catch(() => {
button.innerText = 'Copy failed';
});
}
</script>