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 6197835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:53:31+00:00 2026-05-24T03:53:31+00:00

I have quite a bit of experience with css and even this problem has

  • 0

I have quite a bit of experience with css and even this problem has stumped me.

I am theme-ing the NextGen gallery plugin for WordPress, which means I don’t really have control over the HTML, and I have a problem trying to line up the images.

In NextGen the maximum size of images is 200px x 200px. The images are thumbnails of larger images, each with its own constraints in size and dimension but all under 200px x 200px

The main aim:
The class image is fixed width but its width changes depending on the image that is within it. The class imageBox surrounds images and has its width fixed to the maximum width of images (200px wide, 200px high). For the images that are not 200px wide I want them to line up in the center of the imageBox.

The basic HTML generated by NextGen Gallery:

<div class="imageBox">
   <div class="image">
      <img />
   </div>
</div>

My CSS so far:

.imageBox{
    width: 218px;
    height: 218px;
    float: left;
    position: relative;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.image{
    margin-right: 5px;
    text-align: center;
    position: absolute;
    bottom: 0px;
    display: inline-block;
}

I have used absolute positioning to ensure the images are all lined up along their bottom edge, thus the bottom:0px.

Any help would be great.

EDIT
Messed up the css, had the classes the wrong way round.

  • 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-05-24T03:53:32+00:00Added an answer on May 24, 2026 at 3:53 am

    The solution is to give a fixed 200px width to the image class and set it with position absolute and bottom 0px. This causes it to snap to the bottom of the imageBox class while taking the full width of its container.

    Since the image div is now at the bottom and the full width, all thats needed is to center the image so I applied margin 0px auto to the image > img class, centering the image and solving my problem.

    This can be seen here.

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

Sidebar

Related Questions

I am no DBA. I do have quite a bit of experience in retrieving
I'm rather new to perforce, but have quite a bit of other VCS experience...
I have quite a bit of experience using the basic comm and group MPI2
I'm new to programming androids but I have quite a bit of experience programming
I have (after quite a bit of work) a web test that will upload
I have been thinking quite a bit here lately about screen scraping and what
I have a Windows Form that takes quite a bit of time to load
I have a page which does quite a bit of work and I don't
I have a command-line utility that gets quite a bit of downloads from my
I've done quite a bit of programming on Windows but now I have to

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.