Back to CSS Notes
Topic #145

Hover Overlays

Hover overlays place captions and buttons over images when hovered. They are the standard pattern for portfolio and product cards.


Image Hover Overlay

Create an overlay effect on hover:


Flip an Image

Move your mouse over the image to flip it horizontally:

Paris

Example

  img:hover {

  transform: scaleX(-1);
}

CSS can be used to create responsive image galleries. This example uses media queries to re-arrange the images on different screen sizes. Resize the browser window to see the effect:

Example

  @media only screen and (max-width: 768px) {
  div.gallery-item {

  width: calc(50% - 20px);
  }
}

@media only screen and (max-width: 480px) {

  div.gallery-item {
    width: calc(100% - 20px);
  }
}

Tip: Read more about Responsive Web Design in our CSS RWD Tutorial.

Want to go beyond the notes?

Join Coding Now Tech Institute's CSS course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

Hover Overlays – FAQs

Quick answers about learning Hover Overlays in CSS.

This free note from Coding Now Tech Institute explains Hover Overlays in CSS — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every CSS topic on Coding Now Tech Institute, including Hover Overlays, is 100% free with no signup required.
With focused practice, most students grasp Hover Overlays in 1–3 days from these notes; pairing it with Coding Now Tech Institute's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the Coding Now Tech Institute Community (/community) — expert instructors answer within 24 hours.
Call NowEnroll Now