• Skip to primary navigation
  • Skip to main content
  • Skip to footer
Web Design KC's Logo

Web Design KC

we build really cool websites for small businesses.

  • Home
  • Pricing
    • SEO
    • Maintenance Request
  • Portfolio
    • Case Studies
  • About
    • For Agencies
    • Locations
  • Blog
  • Contact
Home » Blog » Build a Location Card with Readable Text Over a Photo

Build a Location Card with Readable Text Over a Photo

October 16, 2026 by Kolten Craft Leave a Comment

CSS Lab 05 / Location photo card — illustrated example

A location card needs to communicate its place before it shows off its photography. Put a persistent overlay between the image and the label, then keep the label visible in every state. This example uses a real Country Club Plaza photograph and a subtle image zoom.

Try the CSS05 / Location photo card

Change the CSS below. The preview updates as you type. Your edits stay in this browser tab.

Live preview

Change the overlay opacity, image position, and scale. Keep the location readable.

HTML for this example
<a class="location-card" href="#location-result"><img src="https://webdesignkc.com/wp-content/plugins/wdkc-content-grids/assets/lab/plaza.jpg" alt="" width="1280" height="960"><span>Country Club Plaza<span class="location-card__detail">Explore the neighborhood →</span></span></a><p id="location-result" class="example-note">Demo destination. Photo: charvex (2008), public domain, via Wikimedia Commons. Cropped by CSS for this example.</p>

Separate the photo, overlay, and text

The photo fills the card with absolute positioning and object-fit: cover. A pseudo-element supplies the dark overlay. The label remains in normal grid layout, so long names can make the card taller. isolation: isolate keeps the negative layer values inside the card rather than behind the page.

Tune the crop and contrast together

Change object-position to keep the recognizable part of the photo in frame. Then adjust --overlay while checking the brightest area beneath the text. There is no one opacity value that works for every photo. Check each image, narrow-screen crop, and hover state; a text shadow alone does not guarantee readable contrast.

Keep the whole card understandable

Use one descriptive link and keep the place name visible on touch devices. The image has an empty alt attribute because the link’s visible label already identifies the place and the photo is decorative here. If an image supplies additional meaningful information, describe that information appropriately. Reduced-motion preferences remove the zoom transition.

See our location grid. Demo photo: Country Club Plaza by charvex, public domain; displayed with a CSS crop.

Reference: MDN on object-fit.

Have a client website that needs this kind of attention? See our WordPress development for agencies and case studies.

Keep exploring

CSS LabAccessibilityCSS Fundamentals
  • Why Location Pages Matter for Kansas City SEO ↗
  • Zoom an Image Inside Its Frame on Hover with CSS ↗
  • CSS Logo Cards: Reveal a Project Brief on Hover and Focus ↗

Browse the full blog →

Reader Interactions

Leave a Reply Cancel reply

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

Footer

phone – (816)694-0458
email – kolten@webdesignkc.com

copyright © 2026

WebDesignKC-Logo-Teel

let’s work together on
your next project!

contact

Copyright © 2026 • WebDesignKC • Design by Web Design KC Logo