Text Overlay on Images

Below are examples of different ways to superimpose text on images using HTML and CSS.

Example 1: Centered Text

Placeholder Image
Centered Text Overlay

Example 2: Bottom Caption

Placeholder Image

Bottom Caption

This text has a semi-transparent black background to ensure readability.

Example 3: Corner Text

Placeholder Image
Featured

Example 4: Gradient Overlay

Placeholder Image

Gradient Background

This example uses a gradient background that fades from transparent to semi-opaque black, creating a natural space for text at the bottom of the image.

How It Works

The key techniques used in these examples are:

  • Relative positioning on the container element
  • Absolute positioning on the text elements
  • Semi-transparent backgrounds to improve text readability
  • Text shadows to make text stand out against any background
  • Strategic placement (centered, bottom, corner, etc.) for different effects

Feel free to replace the placeholder images with your own and adjust the styles as needed!

© 2011 - Amherst IDA - All Rights Reserved 

4287 Main Street, Amherst, NY 14226 | Phone: 716.688.9000

  

Powered by Fission Content Management System | Buffalo Website Design by 360PSG