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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:54:49+00:00 2026-06-16T11:54:49+00:00

My code: <html> <head></head> <body> <div style=position: relative; border:1px black solid; background-color:#00a2e8; min-width: 100px;

  • 0

My code:

<html>
  <head></head>
  <body>
    <div style="position: relative; border:1px black solid; background-color:#00a2e8; min-width: 100px; min-height: 100px; width: 1px; height: 1px">
      <table border="1" style="width:100%; height: 100%;">
        <tr><td style="vertical-align: middle">abc</td></tr>
      </table>
    </div>
  </body>
</html>

In Firefox, it displays fine, the table filling up the entire div, having the table contents vertially centered.

If I display it on Webkit-based browser, the table doesn’t fill the entire div, causing the label to be vertically aligned to the top. How do I make the table expand to the whole div on Webkit-based browser?

More specifically, I am interested in Android browser.

  • 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-16T11:54:50+00:00Added an answer on June 16, 2026 at 11:54 am

    For your situation, I would normally use position:absolute;height:100%; for the inner element. But that didn’t work for a table, so I used display:block to make it display like a regular DIV. Seems to work well.

    Working example

    <html>
      <head></head>
      <body>
        <div style="border:1px black solid; background-color:#00a2e8; min-width:100px; min-height:100px;height:100px;width:100px;">
          <table style="display:block;border:1px solid red;height:100%;">
              <tr><td style="vertical-align: center;">abc sdfs dfs df sdf sd fsd fsd fsdf sds dfs df </td></tr>
    
          </table>
        </div>
      </body>
    </html>​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: <HTML> <head> <style>div{border:dashed 1px silver}</style> </head> <BODY style=background: #fff;>
What am I doing wrong in this HTML code: <html> <head> </head> <body> <div
The code is as below: <html> <head> <title>test</title> </head> <body> <div><span>shanghai</span><span class=margin> </span><span>male</span></div> </body>
Example code: <html> <head> <script src=jquery-1.3.2.min.js type=text/javascript></script> <script src=jquery-ui-1.7.1.custom.min.js type=text/javascript></script> </head> <body> <table border=1
Here is my code html> <head></head> <body> <?php $dir = 'folder/'; $files = scandir($dir);
I have the following html and css code: <!DOCTYPE HTML> <html> <head> </head> <body>
I have some HTML Code: <html> <head> <title>css test</title> <style type=text/css> .box{width:100%;float:left;background:red} </style> </head>
I have the following code: <!DOCTYPE HTML> <html> <head> <title>What</title> <style type=text/css> #box1 {
My code: <!DOCTYPE html> <html> <head> <title>Demo</title> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <style type=text/css>
OK i have this code HTML: <html> <head> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js> </script> <script type=text/javascript>

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.