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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:10:04+00:00 2026-05-20T23:10:04+00:00

Hi I want to place a Image which is center align vertically and horizontally

  • 0

Hi I want to place a Image which is center align vertically and horizontally as well,
My HTML markup is

<ul class="big-wrapper">
<li>
<div class="filler" style="vertical-align: middle; display: inline-block;">
    <img src="7-612x612-2.png" original="/7-612x612-2.png" style="margin: 0pt auto; display: table-cell; text-align: center; vertical-align: middle;">
</div>
</li>
<li>
<div class="filler" style="vertical-align: middle; display: inline-block;">
    <img src="7-612x612-2.png" original="/7-612x612-2.png" style="margin: 0pt auto; display: table-cell; text-align: center; vertical-align: middle;">

</li>
</ul>

Used Css
ul.big-wrapper li > div {
height:612px;
width:612px;
}

ul.big-wrappe li {
float:left;
margin:0 20px 20px 0;
position:relative;
text-align:center;
}

After doing all those stuff i am not able to do so.Please have a look and help me.

  • 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-20T23:10:05+00:00Added an answer on May 20, 2026 at 11:10 pm

    There’s a few good ways to both horizontally and vertically center an element, it just comes down to the situation and your preference.

    With the following markup:

    <div><img src="a.png" width="100" height="100"></div>
    

    line-height

    div { width:300px; height:300px; line-height:300px; text-align:center; }
    div img { vertical-align:middle; }
    

    Good quick fix without messing with positioning too much but if actually text is being centered this way could be problematic.

    display:table-cell

    div { width:300px; height:300px; text-align:center; display:table-cell; vertical-align:middle; }
    

    Works just like good old tables and highly flexible, however only supported in modern browsers.

    position:absolute

    div { width:300px; height:300px; position:relative; }
    div img { top:-50px; left:-50px; position:absolute; margin:50% 0 0 50%; }
    

    top and left offsets should be set to half the respective dimensions of the element being positioned. Works well if the containing element needs to be flexible but absolute values are required to work.


    Demo of all techniques: jsfiddle.net/Marcel/JQbea (fullscreen)

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

Sidebar

Related Questions

I want to place an image in a textbox which is left aligned with
I want to place a little image next to usernames on my website which
I have three rows which are configured programmatically. I want to place an image
I want to place image on the page which stays on the page bottom-right
I want to place an image inside my custom control , so my generic.xaml
I want to place links over a background image (set in CSS) and I
I want to draw image in place where I click. i have this code:
I have a class of images I want to enlarge (but remain in place)
I want to place panels horizontally, but when I drag panels they are going
I want to display a fullscreen image on which I can run a slide

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.