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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:19:05+00:00 2026-06-01T08:19:05+00:00

I have a very simple problem, but I can’t seem to solve it. I

  • 0

I have a very simple problem, but I can’t seem to solve it. I have a table inside a div, which is the main element. Now I have a td tag inside the table with a width and hight set to that of an iphone screen size. Now I basically want to center that table with its td cell within the div tag, so that the ‘screen’ will be centered in any browser window. How do I do that?

Replacing that div with a table solved my problem, but I would like to use a div instead.

Thank You

  • 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-01T08:19:06+00:00Added an answer on June 1, 2026 at 8:19 am

    Try this one , I do this code – Demo here, Very easy and simple code ( I have used a hack code and extra span tag for only IE old version)
    http://jsfiddle.net/ERuX4/1/

    <div class="demo wraptocenter">
       <span></span>
       <img src="http://www.spitzer.caltech.edu/images/twitter.png?1295473781" alt="" />
    </div> 
    

    css

    .wraptocenter * {
        vertical-align: middle;
    }
    .wraptocenter span {
        display: inline-block;
        height: 100%;
        width: 1px;
    }
    .wraptocenter {
        display: table-cell;
        text-align: center;
        vertical-align: middle;
    }
    
    /*End wraptocenter - image Vcenter  patch styles*/    
    .demo  {
             width:100px;
             height:100px;
             border:1px solid red;
             position:absolute;
             top:50%;
             left:50%;
             margin-top:-100px;
             margin-left:-100px;}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very simple problem, but can't seem to solve it. I'm probably just not thinking
I have a very simple problem for which though I have a solution but
I'm having a very simple problem, which can be solved fairly simple but for
I have a very simple problem, but I just can't figure it out. My
I have what I'm sure is a very simple problem but I can't work
I have very simple problem that I can't solve. I need to do something
I seem to be having a very simple problem but I can't wrap my
very simple problem here... but I can't work it out. I have a simple
I have a very simple problem but cannot find a nice solution. I have
I have a very simple problem and a solution that will work, but I'm

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.