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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:46:41+00:00 2026-06-01T21:46:41+00:00

Looking at my attached image, I am trying to get the darker rectangle shape,

  • 0

Looking at my attached image, I am trying to get the darker rectangle shape, containing an image (with red border), to be aligned at the bottom center of the lighter grey square.

enter image description here

I have tried setting the dark rectangle to position:absolute with a 0px bottom but then I lost my center alignment using margin:0 auto. I’ve also tried just using a vertical-align:bottom but still won’t play ball!!!

What is the CORRECT way of doing this? One thing to bare in mind is that where I have used the sizes 170 x 105, these are actually unknown as they are dynamically produced elements, size is variable.

This is my code so far:

.item_preview { width:220px; height:200px; text-align:center; position:relative; background:#EEE; }
.item_preview_img_wrap { width:170px; height:105px; margin:0 auto; background:#CCC; vertical-align:bottom; }
.item_preview_img_wrap img { margin:0 auto; border:solid 5px #FF0000; }

<div class="gallery_item">
    <div class="item_preview">
        <div class="item_preview_img_wrap">
            <img src="asf.jpg">
        </div>
    </div>

    <div class="item_options">
        options
    </div>

    <div class="item_info_header">
        <div class="date">Date</div>
        <div class="item">ID</div>
        <div class="clear"></div>
    </div>

    <div class="item_info_main">
        <p class="caption">Caption here</p>
        <p class="subject"><strong>People:<strong> People here</p>
    </div>
</div>
  • 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-01T21:46:44+00:00Added an answer on June 1, 2026 at 9:46 pm

    If you want to display image at bottom of light grey box then use CSS below:

    .item_preview { width:220px; height:200px; text-align:center; position:relative; background:#EEE; } 
    .item_preview_img_wrap { width:170px; height:105px; margin:0 auto; background:#CCC; } 
    .item_preview_img_wrap img { border:solid 5px #FF0000; position: absolute; left: 50%; bottom: 0px margin-left: -halfofimagewidth }
    

    Note: -halfofimagewidth is half of size of your image for example if your image is 100px and border is 5px then it should be -55px

    If you want to display image at bottom of dak grey box at center then use CSS below:

    .item_preview { width:220px; height:200px; text-align:center; background:#EEE; } 
        .item_preview_img_wrap { width:170px; height:105px; margin:0 auto; background:#CCC; position: relative; } 
        .item_preview_img_wrap img { border:solid 5px #FF0000; position: absolute; left: 50%; bottom: 0px margin-left: -halfofimagewidth }
    

    Let me know if you still find any issue

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

Sidebar

Related Questions

I am looking something like attached image, How can I implement this in iPhoneSDK.
Looking for a solution to grab a fingerprint image using the attached reader and
I'm looking for a way to get all table creation and alteration queries attached
I was looking of border between two ListViews as shown in the attached screenshot(in
When looking at sample attached properties and behaviors, I've seen a mishmash of uses
Looking for a library or a fairly cross platform method to get CPU utilization,
The attached image is what we want to achieve with html / css. The
I'm looking to generate a link that has a prefix attached to the named
Here's what I'm looking to do: I have an image, let's say of a
I'm trying to encode an image using base64 in Node.JS to pass along 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.