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

What is the most effective method to patiently anticipate a specific duration for a function's output?

I am faced with a situation where I have two functions at hand. One function performs complex logic, while the other wraps this function to provide either the result of computation or an error message after a specified amount of time t. Consider the follo ...

Using React and Material-UI to dynamically populate a table with data retrieved from

Material ui table utilizes data in a specific format. rows: [ createData(1, "dashboard", "details"), createData(2, "product", "product details"), ].sort((a, b) => (a.id < b.id ? -1 : 1)) When the API responds with data stored in st ...

Discovering the size of content through solely the height and width of a div: Is it possible?

Can someone help me figure out how to calculate the content length based solely on the height and width of a div? For example, if a Div has a height:200px & width:200px, I would like to know that the stored content length is 298. function calculateCo ...

Managing collapsible content in Bootstrap 4: A comprehensive guide

How can I customize collapsible content in Bootstrap 4? For instance, take a look at this navbar: https://i.sstatic.net/UYbMQ.png https://i.sstatic.net/OuVdw.png https://i.sstatic.net/lXvYt.png I'm looking to modify the behavior of this example. ...

Tips for aligning the arrow of a dropdown menu option

When examining the code provided, I have noticed the clr-select-container with specific attributes as depicted. In the screenshot attached, it displays the clr-select-container. The issue that I am encountering is that the inverted arrow is positioned a f ...

streamlining form updates in vue

The code snippet provided is functional but unnecessarily complicated and lengthy. I am seeking a more efficient approach to achieve the desired outcome. <h6><label for="number">Change Number</label></h6> ...

React application experiencing duplication of uploads in Firestore

I am facing a frustrating issue with uploading recipes to Firestore in my React application. The problem I am encountering is that the data is getting duplicated in the Firestore collection, and I am unable to determine the root cause. Let me provide you ...

To prevent using helperText to adjust the width of an input field, MUI recommends implementing

When utilizing the helpertext feature of the mui textfield component for validation errors, I encountered an issue where the helpertext was causing the width of the textfield to expand. This occurred even when using the "fullWidth" attribute. If there are ...

Show a loading icon as the data is being fetched

I am currently facing an issue with displaying a loader icon while data is being fetched from an API. Despite my efforts, I have not been successful in showing the loader icon during the data retrieval process. My folder structure looks like this: compo ...

Exploring ways to locate a specific text within a URL using nodeJS

Here is a simple code snippet with a problem to solve: var S = require('string'); function checkBlacklist(inputString) { var blacklist = ["facebook", "wikipedia", "search.ch", "local.ch"]; var found = false; for (var i = 0; i < b ...

Combining and removing identical values in JavaScript

I need to sum the price values for duplicated elements in an array. Here is the current array: var products = [["product_1", 6, "hamburger"],["product_2", 10, "cola"],["product_2", 7, "cola"], ["product1", 4, "hamburger"]] This is what I am aiming for: ...

Is there a way to extract and store an image from a webpage using selenium, beautifulsoup, and Python 3?

Currently, my main goal is to extract and save a single image from a website post logging in. After examining the image, I discovered that it has a full xpath of /html/body/form/main/div/section/div[1]/div/div[2]/div/img. My plan is to utilize beautiful so ...

Is it necessary to use Hapi.js on the client side in order to establish a websocket connection using the Hapi.js protocol?

Currently, I am in the process of developing an API using Hapi and requiring WebSocket functionality. After some research, it appears that Nes is the preferred choice to integrate with Hapi for this purpose. Fortunately, Nes simplifies the process signific ...

I am having an issue with an input field not reflecting the data from the Redux state in my React app,

I am currently working on a todo list project using the MERN stack with Redux for state management. One issue I am facing is that the checkboxes for completed tasks are not reflecting the correct state from Redux when the page loads. Even though some tasks ...

Is there a way to decrease the size of the content within this iFrame?

Is there a way to display 6 cameras on a single webpage without them taking up the entire screen within iframe windows? Can the content be shrunken to fit the iframe window? <!doctype html> <html> <head> <meta charset="utf-8"> &l ...

On Linux systems, Node.js in JavaScript interprets strings as objects only

I'm encountering an issue with my Discord.io bot. I am attempting to run it on a Linux server, but the Linux version of Node.js keeps treating the contents of a string as a separate object, leading to the following TypeError: TypeError: Object IT&apo ...

Node.js: Troubleshooting a forEach Function Error

I am encountering an issue with my nodejs script that is causing a "function not found" error after trying to insert data from json files into Firestore. How can I resolve this? Thank you for your help. Below is my code snippet: var admin = require("f ...

Issue with tile size or alignment in Safari

Recently, while creating my portfolio on CodePen, everything was running smoothly except for one little hiccup - Safari. http://codepen.io/tpalmer75/pen/FijEh (SASS for just one .item element) .item width: calc(100% / 3) display: inline-block height ...

Creating double borders in CSS with the second border extending all the way to the top of the element

Can you help me figure out how to achieve this effect using CSS? It seems like a simple task: border-top: 1px solid #E2E2E2; border-left: 1px solid #E2E2E2; border-bottom: 1px solid #848484; border-right: 1px solid #848484; Just add: box-shadow: 0.7px ...

Is the incorporation of state management tools like Redux or Vuex proven to enhance the speed of a web application?

Can storing data in a central store improve the speed of a web application? I believe one advantage is that after retrieving data from an API, it can be preloaded for the user when they revisit the view. In contrast, without state management, users would ...