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

The Archive Base Latest Questions

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

I developed my own Web-Admin behind the front-end. It’s a typical Admin with container

  • 0

I developed my own Web-Admin behind the front-end. It’s a typical Admin with container , one menu-navigation in the left and a body content in the right which shows the result (typically a table) related to the clicked menu item.

What is the best way to get the correct number or rows in the table in order to fit the the body page at 100% ?

In my case, i have seen that the number of tow required to fill the space in the table is different while changing the screen resolution.

I know a quick solution could be to calculate the resolution and get the table populated after knowing the screen resolution. I was wondering if if possible to set the TD or TR height at runtime, based on the screen resolution or somehow else.

Thanks,

  • 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-10T03:54:50+00:00Added an answer on June 10, 2026 at 3:54 am

    Here is a fiddle that demonstrates the rendering of rows depending on the browser innerHeight.

    HTML

    <table id="mytable"></table>​
    

    CSS

    td {
      height:20px;
    }​
    

    JavaScript

    var numberOfRows = Math.floor(window.innerHeight / 20);
    
    var table = document.getElementById("mytable");
    
    function createCell() {
        var cell = document.createElement("td");
        cell.innerText = "Cell";
        return cell;
    }
    
    function createRow() {
        var row = document.createElement("tr");
        row.appendChild(createCell())
        return row;
    }
    
    for (var i = 0; i < numberOfRows; i++) {
        table.appendChild(createRow());
    }​
    

    PS. 1 I’ve set the height of the cell in CSS, this can be done differently
    PS. 2 I’ve floored the number of rows that fit on the screen. So there will be some empty space at the bottom.

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

Sidebar

Related Questions

Is it possible to create a custom Web front-end to run SSRS reports from?
I developed my own custom web server for a robot I built ( video
I am web developer who currently works mostly on his own but, some projects
If we have developed our own ORM framework and the framework is working fine
We have our own custom calendar in our portal which is developed in Java.
I own a web server running Windows ( WAMP ). I want to know
I have developed a web application that uses a web server and database hosted
We have an ASP.NET MVC application for which we have developed our own custom
I have developed a web service(using ruby/sinatra/sqs) which runs on Linux Red Hat. I
I have a DLL I developed and 2 web applications uses it. I want

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.