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

  • SEARCH
  • Home
  • 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 8951313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:38:03+00:00 2026-06-15T13:38:03+00:00

I am trying to put the images side by side with captions. That works

  • 0

I am trying to put the images side by side with captions.

That works out of the box by default doing the following:

<figure>
<img src="1.jpg" width=320 height=240 alt="Image 1">
<img src="2.jpg" width=320 height=240 alt="Image 2">
<img src="3.jpg" width=320 height=240 alt="Image 3">
<img src="4.jpg" width=320 height=240 alt="Image 4">
</figure>

I get the list of images side by side depending if my width allows it. I get what i want. is such 2 columns of images:

Image 1 Image 2
Image 3 Image 4

Now if i add figcaption as following:

<figure>
<img src="1.jpg" width=320 height=240 alt="Image 1">
<figcaption>caption 1</figcaption>
<img src="2.jpg" width=320 height=240 alt="Image 2">
<figcaption>caption 2</figcaption>
<img src="3.jpg" width=320 height=240 alt="Image 3">
<figcaption>caption 3</figcaption>
<img src="4.jpg" width=320 height=240 alt="Image 4">
<figcaption>capton 4</figcaption>
</figure>

Everything looks like this:

Image 1
caption 1 
Image 2 
caption 2 
Image 3  
caption 3 
Image 4
caption 4

I also was playing with lists and hierarchy and css.

The question is how can i make the following ?

Image 1 Image 2 
caption 1 caption 2 
image 3 Image 4   
caption 3 caption 4

Many Thanks,
Karolis

  • 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-15T13:38:04+00:00Added an answer on June 15, 2026 at 1:38 pm

    First, we need to fix your mark-up (only 1 figcaption allowed per figure). Then we need to add some sort of container element. I chose aside as my container, but it can be any block level element that feels appropriate (div, section, etc.):

    http://jsfiddle.net/ZksyN/2/

    <aside class="figures">
    <figure>
    <img src="1.jpg" width=320 height=240 alt="Image 1">
    <figcaption>caption 1</figcaption>
    </figure>
    
    <figure>
    <img src="2.jpg" width=320 height=240 alt="Image 2">
    <figcaption>caption 2</figcaption>
    </figure>
    
    <figure>
    <img src="3.jpg" width=320 height=240 alt="Image 3">
    <figcaption>caption 3</figcaption>
    </figure>
    
    <figure>
    <img src="4.jpg" width=320 height=240 alt="Image 4">
    <figcaption>capton 4</figcaption>
    </figure>
    </aside>
    

    Just enough CSS here to get the elements to appear inline. You’ll probably want to reduce the left/right margins on figure. I’ve also left off any sort of restrictions on how many columns must appear, so it is responsive by default (narrow devices will get 1 column, extra wide devices could get 3 or 4 columns if they’ll fit). If you want to add a hard upper limit on the number of columns, add a max-width to aside.figures equal to (image width + side margins) * number of columns.

    aside.figures {
        overflow: hidden; /* only needed if floating the child elements instead of using inline-block */
    }
    
    aside.figures figure {
        display: inline-block;
        border: 1px solid;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to put two images side by side inside a <td> (also
I'm trying to put together an image uploader. I want to upload images into
I'm trying to use Google's Images API to search an image and put it
Trying to put a regex expression together that returns the string between _ and
I trying to put together an Android app that will take a picture and
Hello im trying to echo out a image in side pagenation but is just
I am trying to put an image on the left side of the search
I'm trying to put a list of buttons side by side so they all
I am working on a web page and I am trying to figure out
I'm trying to put a news column and a login column side by side,

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.