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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:27:23+00:00 2026-06-08T06:27:23+00:00

I cannot center a image in a div . How can I center the

  • 0

I cannot center a image in a div. How can I center the image given the following markup?

html code is as follows:

<div id='post-area' style='background:#000; padding:20px 0;'>
  <a class='fancybox' rel='group' href='example-big.png'>
    <img src='example.png'  />
  </a>
</div>

css code is as follows:

#post-area {
  font-size:13px;
  color:#000;
  text-align:left;
  width:450px;
  height:auto;
  font-family:Meera
  clear:both;
  margin-top:20px;
  letter-spacing:normal;
}

#post-area img {
  max-width:250px;
  height:auto;
  float:none;
  margin:0 auto;
}

If there is any way to do this

  • 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-08T06:27:26+00:00Added an answer on June 8, 2026 at 6:27 am

    If you just want to center the image horizontally, you could change text-align:left to text-align: center.

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

Sidebar

Related Questions

I have the following simplified HTML code: <div> <h2>XXX</h2> <img XXX /> <a href=XXX><div
I have the following code for showing some images: HTML: <div class=footer-logos> <ul> <li><img
I need to align the image to Center inside the DIV but I cannot
I cannot lineup these three <div> (image is scaled down): HTML: <div id=container> <div
I cannot wrap my brain around the following thing ... and I hope there's
I have the following image ontop of an image that is exactly 424x318 And
I need to make a css background image fade slideshow. For several reasons, i
I cannot get this last div to go up properly in my layout and
Here is the link : www.guidegather.com (sorry, tried posting image but cannot) If you
I have a button that uses a stretchable PNG as the background image, like

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.