The scrollbar fails to reach the bottom of my table, preventing me from viewing the entire content

I'm currently facing a challenge with a table on my webpage that displays data but isn't scrolling all the way to the bottom. This code was implemented by previous developers, and as someone who isn't well-versed in CSS, I'm struggling to pinpoint the issue causing this scroll restriction. Any insights or guidance on how to resolve this would be greatly appreciated. Thank you.

Removing the first div allows for smooth scrolling, but since there are three more tables on the same page which appear based on button clicks, I need to retain that div structure.

For context: The "RenderBody()" function returns an array of elements. There are three additional tables similar to the one above, and they're encountering the same scrolling problem. The ".tableData" classes have varying widths.

myFile.js


<div className="JobTabContentContainer" id="PendingContainer">
    <table className="TableHeaderContainer">
        <thead>
            <tr>
                <th className="tableData10">Data1</th>
                <th className="tableData10">Data2</th>
                <th className="tableData10">Data3</th>
                <th className="tableData10">Data4</th>
                <th className="tableData12">Data5</th>
                <th className="tableData8">Data6</th>
                <th className="tableData10">Data7</th>
                <th className="tableData10">Data8</th>
                <th className="tableData10">Data9</th>
                <th className="tableData10">Data10</th>
            </tr>
        </thead>
    </table>

    <div className="TableBodyScrollingDiv">
        <table className="TableBodyContainer">
            <tbody>  
               {this.RenderBody("Pending",this.props.jobData)}
            </tbody>
        </table>
    </div>
</div>

myFile.css


  .JobTabContentContainer {
    flex: 1;
    display: none;
    flex-direction: column;
  }
  .ViewedContentContainer {
      height: 95%;
      display: flex;
      flex-direction: column;
  }

  .ViewedContentContainer .TopBarContainer,
  .ViewedContentContainer .BottomBarContainer,
  .ViewedContentContainer .TitleBarContainer {
      min-height: fit-content;
      min-width: 916px;
      padding-top: 5px;
      padding-bottom: 5px;
      position: sticky;
      left: 0;
      right: 0;
  }


  .ViewedContentContainer .TitleBarContainer {
      text-align:center;
  }
  .ViewedContentContainer .TitleBarContainer h1 {
      margin: 0;
      padding: 0;
  }

  .ViewedContentContainer .TableHeaderContainer {
      border: 2px solid var(--Blue);
      background-color: var(--Blue);
      color: var(--LighterBlue);
      text-align: center;
      min-width: 916px;
  }

  .ViewedContentContainer .TableBodyScrollingDiv {
      text-align: center;
      border: 2px solid var(--Blue);
      background-color: white;
      overflow-y: auto;
      overflow-x: hidden;
      min-width: 916px;
      max-height: 90%
  }

  .ViewedContentContainer .TableBodyScrollingDiv .TableBodyContainer {
      width: 100%;
      font-size: 10px;
  }
  .ViewedContentContainer .TableBodyScrollingDiv .TableBodyContainer .TableBodyRow {
      display: table-row;
  }
  .ViewedContentContainer .TableBodyScrollingDiv .TableBodyContainer .TableBodyRow:nth-child(odd) {
      background-color: var(--LightBlue);
      color: var(--DarkBlue);
  }

  .ViewedContentContainer .TableBodyScrollingDiv .TableBodyContainer .TableBodyRow:nth-child(even) {
      background-color: var(--LighterBlue);
      color: var(--DarkBlue);
  }

  .ViewedContentContainer .TableBodyScrollingDiv .TableBodyContainer .TableBodyRow:hover {
      background-color: var(--AccentBlue);
      color: var(--DarkBlue);
  }

  .ViewedContentContainer .TableBodyScrollingDiv .TableBodyContainer .TableBodyRow td{
      word-wrap: break-word;
  }

  .ViewedContentContainer .TableBodyScrollingDiv .TableBodyContainer .TableBodyRow .JobReviewStatusBtn {
      border-radius: 5px;
  }

The recent occurrence of this scrolling issue is perplexing, considering it has not been problematic before. I am unsure if it's due to an overflow complication or potentially something else that may be straightforward.

Answer №1

I recently included height: 100% in my code.

     .JobTabContentContainer {
        height: 100%;
        flex: 1;
        display: none;
        flex-direction: column;
    }

To my surprise, this modification resolved the issue I was facing.

Answer №2

If the container with scrolling capability is extending beyond its parent element and the overflow is being hidden, you can resolve this issue by identifying the parent container with the scrollbar and making adjustments such as removing any set height, setting overflow to visible, or reducing the size of the scrollable div to be smaller than its parent.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Having trouble connecting to Azure SQL server from my Node.js application

I'm attempting to run a basic query to my Azure SQL server from NodeJs, but I'm encountering errors indicating that I cannot establish a connection to the server. The details provided in my code are correct because I've used them successfull ...

Encountered an issue parsing the JSON file, possibly due to a concealed value within the JSON content

After coming across this JSON file online: https://drive.google.com/file/d/1zh_fJJNWs9GaPnlLZ459twSubsYkzMi5/view?usp=share_link Initially, it seemed fine and passed various online json schema validators. However, upon attempting to parse it locally usin ...

HTML5 - Transforming your webpages into interactive flipbooks

Is there a way to achieve a page-turn effect when loading external HTML pages into a div? I am interested in utilizing CSS3, HTML5 or jQuery for this purpose. ...

Organize the HTML table upon importing

In my code, I am populating a table with data retrieved from a JSON object. Here is the JavaScript snippet: if (jsonObj[0].array !== 'undefined' && jsonObj[0].array.length > 0) { for (var i = 0; i < jsonObj[0].array.length; i++ ...

Analyzing latency in node.js through numerous requests

Is there a way to send multiple requests in a loop, and measure the time of each request? In PHP I'd do: require 'vendor/autoload.php'; use GuzzleHttp\Client; $client = new Client(); for ($i = 0; $i < 100; $i++) { $start = mic ...

Verify ownership information by utilizing Node.js

Seeking guidance here. Currently, I am working on a Node.js and MongoDB application related to Apartment ownership. Within this application, there are two main datasets: Ownership and Tenants. For instance, Mr. A owns units 10 and 11. Then we have Mr. C wh ...

Issue with Docker: Docker does not support Parcel (Parceljs) installation

When I try to run my Node.js application within a Docker container, the parcel build process fails with an unhelpful error message. However, the application runs smoothly without any issues when executed locally outside of Docker. To troubleshoot this pro ...

Is it possible to modify this code to accept multiple IDs at once?

I'm attempting to create a form in JavaScript where, upon entering the necessary details and clicking submit, the user's email client opens with the information pre-filled for easy sending. However, I am facing challenges as my code involves mult ...

Showing a dropdown menu within a React Antd Table

const bands = this.props.ApplicationContainer.bands; if(bands) { var bandsHtml = '<Select defaultValue="Select"><Option value="Select">Select</Option>'; const ...

Error occurred when attempting to fetch data from a nested JSON object in React/Next.JS

Having trouble retrieving data from my API and encountering this error message. I suspect it may be related to the JSON structure. Interestingly, when using a different URL with nested arrays, it works fine. However, my current data is not cooperating. Any ...

How does express.js utilize a wildcard route feature?

Currently in my app.js file, I have these routes set up: app.use("/api/v1/users", userRouter) app.use("/*", indexRouter) In the index.js file, it looks like this: var express = require('express'); var router = express.Router(); /* GET home pa ...

The wget tool is capable of downloading CSS files that contain @import rules, however it overlooks

Currently utilizing the following command with wget: wget --page-requisites --convert-links -e robots=off \ --span-hosts --restrict-file-names=windows \ --directory-prefix=$ASSETS_DIR --no-directories http://myhost/home The HTML page ...

`Incorporate concurrent network requests in React for improved performance`

I am looking to fetch time-series data from a rest service, and currently my implementation looks like this async function getTimeSeriesQuery(i) { // Demonstrating the usage of gql appollo.query(getChunkQueryOptions(i)) } var promises = [] for(var i ...

A 'TypeError' is being displayed in the console stating that it is unable to read properties of undefined when trying to access the '

I've been encountering this error in the console and I'm struggling to find a solution for it. Strangely, I haven't even used "toString" in the app anywhere. It seems like the issue lies within the Row section as every time I delete the Row ...

A guide on synchronizing package.json dependencies in npm

When I install a module using npm install moduleName -save, the package.json file does not automatically add the dependencies of the module once npm notifies me that the installation is complete. Is there a way to sync the module to the dependencies in p ...

The player remains unchanged

Hi, I am currently working on my app to update a player's age. To start off, I have added three players: const playerOne = store.dispatch(addPlayer({ firstName: 'Theo', lastName: 'Tziomakas', position: 'Goakeeper ...

The col-md-4 class in Bootstrap does not consistently maintain a width of 33%

Currently, I am utilizing bootstrap cards in my project. The number of cards within a card-deck varies dynamically. However, I have encountered an issue where each card should occupy a width of col-md-4 (33%). Everything works fine when there are more than ...

The background on my modal remains unchanged

I have integrated a modal using Iframe for user login/registration on my website. Here is the HTML code: <div class="modal" id="ays-popin-connexion" aria-hidden="true"> <div class="modal-body" aria-hidden="true"> <iframe src=" ...

Quick Validator. Establishing a schema that relies on specific values

I have a situation where I need to differentiate between two types of users - teacher and student. The schema for a teacher looks like this: { username : string; firstName : string; lastName : string; type : 1; // 1 = teacher schoolId : o ...

Retrieve all records in which a Sequelize association uses hasOne

Currently, I am exploring the `sequalize association - hasOne` feature. However, I encountered an unexpected issue where all the rows from the `USER` table are being returned instead of just the rows from the `system_admin` table. Is this the intended beha ...