Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8752967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:20:22+00:00 2026-06-13T13:20:22+00:00

What is the proper way to create responsive, transparent CSS captions over images —

  • 0

What is the proper way to create responsive, transparent CSS captions over images — with graceful degradation in older browsers?

I am trying to achieve:

  • Centered vertical column of images
  • Images are equal heights and widths
  • Each image has a caption which should be centered
  • Caption should have a see-through background
  • Would be nice if the background became black in older browsers that don’t support transparency

If you take a look at this Fiddle example, there’s clearly a lot wrong with it.

The basic premise for HTML5 is:

<section>
    <figure>
        <img src="1.jpg">
        <figcaption>Caption 1</figcaption>
    </figure>

    <figure>
        <img src="2.jpg">
        <figcaption>Caption 2</figcaption>
    </figure>

    <figure>
        <img src="3.jpg">
        <figcaption>Caption 3</figcaption>
    </figure>
</section>

But the CSS3 code is where we get some problems. Is it the right approach even? I got it to work with some fine-tuning (not included), but the fine-tuning doesn’t seem to make semantic sense to me anyway.

For example, this is the result:

enter image description here

I have a feeling the CSS is wrong on many levels (pun intended).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:20:23+00:00Added an answer on June 13, 2026 at 1:20 pm

    I modified your CSS slightly. The main changes were adding position: relative; to the parent element and position: absolute; to the caption.

    CSS:

    section {
        overflow: auto;
    }
    
    section figure {
        float: left;
        clear: both;
    
        position: relative;
        overflow: auto;
    
        margin: 0 auto;
        padding: 30px 0 0 0;
        font-size: 15px;
    }
    
    section figure img {
        vertical-align: bottom;
    }
    
    section figure figcaption {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
    
        background: rgba(0,0,0,0.7);
        text-align: center;
        color: #fff; 
        padding: 10px;
    }
    
    
    section {
        padding-bottom: 30px;
        background: #ccc;
    
    }
    

    Demo: http://jsfiddle.net/XjthT/6/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As you know, the proper way to create a Dom Element in Java is
What's the proper way to create 2 entities where 1 is a parent of
What's the proper way to create a hyperlink in Spring+JSP? There must be a
I was looking a proper way to implment a ScaleAnimation. My purpose is to
What's the proper way to add a literal text value from a field to
Is there a proper way, equation or technique in general to say, My web
QUESTION: What is the proper way to use .get() in conjunction with .one() (or
What is the proper way to do the following in clojure? (ns todo.test.models.task (:use
Is there a proper way yet to unit test views with the aspx view
What is the proper way to implement assignment by value for a reference type?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.