Incorrect Calculation of CSS Grid Container Width in Firefox

When using this CSS Grid code, there is a difference in behavior between Chrome and IE compared to Firefox.

https://codepen.io/inkOrange/pen/XGzeMo This layout is intended to scroll horizontally when the content overflows beyond the fixed container size of 900px. This discrepancy can be observed in the demo provided.

In Chrome (version 72.0), inspecting the .TableRow grid container shows a width of 1010px, resulting in a horizontal scrollbar due to the overflow.

However, in Firefox (version 65.0), the width appears less than the bounding box at 885px, which does not trigger an overflow/scroll bar.

Although the contents of .TableRow exceed the boundary in both browsers, Firefox seems unable to accurately determine the true width of the css-grid elements.

Any suggestions on how to resolve this issue for Firefox? The expectation is to have a scroll bar on .TableWrapper

HTML:

<div style="width: 900px; overflow: auto;">
  <section class="TabularListing">
    <section class="TableWrapper">
      <div class="TableHeaderContainer">
        <div></div>
        <div><label style="cursor: pointer;">Dest</label></div>
        <div><label style="cursor: pointer;">Opened</label></div>
        <div><label style="cursor: pointer;">Cube</label></div>
        <div><label style="cursor: pointer;">Y<em>(ft)</em></label></div>
        <div><label style="cursor: pointer;">Z<em>(ft)</em></label></div>
        <div><label style="cursor: pointer;">Z<em>(ft)</em></label></div>
        <div><label style="cursor: pointer;">Weight</label></div>
      </div>
      <div class="TableBodyContainer">
        <div class="TableRow">
          <div></div>
          <div><span data-filterable="true" data-value="BILL">BILL</span></div>
          <div><span>1380233679000</span></div>
          <div><span>72</span></div>
          <div><span>94</span></div>
          <div><span>94</span></div>
          <div><span>94</span></div>
          <div><span>94</span></div>       
        </div>
        <!-- More rows -->
     </div>
    </section>
  </section>
</div>

CSS:

.TabularListing {
  position: relative;
    .TableWrapper {
      display: grid; 
      grid-template-rows: 64px calc(136px); 
      overflow: auto hidden;
      .TableHeaderContainer {
        background-color: white; 
      min-height: 24px; 
      max-height: 64px; 
      overflow: hidden; 
      display: grid; 
      width: 100%; 
      grid-template-columns: 50px 250px 180px 130px minmax(100px, 12.5%) minmax(100px, 12.5%) minmax(100px, 12.5%) minmax(100px, 15%); 
      border-bottom: 1px solid rgb(224, 224, 224);
        > div {
          box-shadow: rgba(0, 0, 0, 0) 0px -1px 0px 0px inset, rgb(224, 224, 224) 0px -1px 0px inset; transition: all 0.5s ease 0s; 
          opacity: 0.75; 
          padding: 20px 38px 20px 60px; 
          cursor: default; 
          overflow: hidden; 
          text-overflow: ellipsis; 
          font-size: 1.3rem; 
          font-weight: 400; 
          text-align: left; 
          line-height: 1.5rem; 
          color: rgb(33, 33, 33); 
          vertical-align: top; 
          background-color: white; position: relative;
        }
      }
      .TableBodyContainer {
        overflow: hidden auto; width: 100%;
        .TableRow {
          display: grid; 
          grid-template-columns: 50px 250px 180px 130px minmax(100px, 12.5%) minmax(100px, 12.5%) minmax(100px, 12.5%) minmax(100px, 15%); transition: box-shadow 0.25s ease 0s; 
          background-color: white; 
          border-bottom: 1px solid rgb(224, 224, 224); 
          cursor: pointer; 
          min-height: auto;
          > div {
            padding: 20px 40px 20px 60px; 
            cursor: default; 
            overflow: hidden; 
            text-overflow: ellipsis; 
            font-size: 1.3rem; 
            text-align: right; 
            position: relative;
          }
        }
      }
    }
}

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

How can I align text to the center and set the text color at the same

Looking to place text in the center of a colored box? Although attempting to center the text, you may find that it remains towards the top rather than in the middle of the box. How can you shift the text down so it aligns with the middle of the backgroun ...

What is the best way to use createElement in JavaScript to insert <p> and <span> elements within a <div>?

I am currently experimenting with generating sentences accompanied by draggable text boxes. To achieve this, I intend to construct the following HTML structure using JavaScript exclusively: <div> <p>Data1<span class = "smallBox droppabl ...

Is it possible to identify horizontal scrolling without causing a reflow in the browser?

If you need to detect a browser scroll event on a specific element, you can use the following code: element.addEventListener('scroll', function (event) { // perform desired actions }); In order to distinguish between vertical and horizontal ...

Exploring CSS3 animations: customizing animations for individual elements based on scroll movements

Can you help me with CSS3 animations triggered by scrolling? I came across a code that reveals a DIV element as the user scrolls down: <script type="text/javascript"> $(document).ready(function() { /* Every time the window ...

Tips for preventing the appearance of a horizontal scroll bar when utilizing the FlexLayoutModule in Angular

import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-property-feed', templateUrl: './property-feed.component.html', styleUrls: ['./property-feed.component.scss'] }) export class Prope ...

Adjust the width of columns using HTML and CSS

UPDATED: Here is a real-life scenario I am facing: I am trying to adjust the width of columns in my table using inline CSS. Let me provide you with an example: The Table was initially set to 100%, like this: <table width=100% ...> The total number ...

Having trouble implementing font css file in Reactjs

When working with Reactjs (Nextjs), every time I try to incorporate "css" into my project, I encounter the following error on my screen: Module not found: Can't resolve '../fonts/fontawesome-webfont.eot?v=4.7.0' How can I solve this issue? ...

What is the best way to change the background color for my photo gallery?

I'm currently working on a project to create a unique photo gallery where each image has a different colored background. I have six images in total, but right now all of them have a pink background. I've attempted adding another .popup class in t ...

Attempting to gather data from an HTML form and perform calculations on it using JavaScript

Looking for help with extracting user input from HTML and performing mathematical operations in JavaScript. Coming from a Python background, the variable system in JavaScript is confusing to me. Can someone provide guidance on how to achieve this? <div ...

When using jQuery to focus on an input element, the cursor fails to show up

Looking to enhance user experience by focusing on an input element upon clicking a specific div. The HTML structure being used is as follows: <div class="placeholder_input"> <input type="text" id="username" maxlength="100" /> <div ...

JavaScript and HTML with Node.js

Exploring the world of HTML, running smoothly with a static IP address 192.168.56.152 using apache on the host computer. <!DOCTYPE html> <html > <head> <title>OnlinePage</title> <meta charset="utf-8"& ...

Displaying content on the <div> element

Looking for recommendations for a jQuery plugin or JavaScript solution that allows me to load a full "view" into a <div> when a user clicks on a link. The challenge I'm facing is that I have 8 pages, with the Homepage consisting of 3 divisions: ...

Add custom CSS styles to a webpage using the CSS Style element retrieved from

I am working on an HTML page that has a TextArea and label. My goal is to create CSS classes in the TextArea and apply them to the label: <textarea id="txtCSS" name="txtCSS" rows="4" cols="50"> .FC{color:gr ...

WebDriverException: Error: {"errorMessage":"The object is undefined"

I encountered an error while running the code on this HTML page, specifically at /html/body/div[3]/div[1]/div[1]/div[1]/div/div[10]/a/div[1]/div[2]: WebDriverException: Message: {"errorMessage":"null is not an object (near '...ull).singleNodeVa ...

Tips for incorporating inline styling into the body element

Can someone help me with adding inline style to the body element using jQuery? I want to set the background color to white (#FFFFFF). Your assistance would be highly appreciated. Thank you! ...

Please provide an explanation for the statement "document.styleSheets[0].cssRules[0].style;"

I'm seeking an explanation for this block of code: document.styleSheets[0].cssRules[0].style; It would be helpful if you could use the following code as a reference: * { padding: 0; margin: 0; box-sizing: border-box; font-family:&apos ...

Obtaining the accurate offsetTop and offsetLeft values for an element following a CSS3 rotation

Is there a method to accurately determine the offsetTop and offsetLeft values of an element post-transform rotation? Are there any lesser-known element properties that could be helpful in this scenario? Attached is an image that can provide further clari ...

Error encountered while validating jQuery word cloud

Can anyone please assist me with validating a jQuery word cloud in HTML5? I'm encountering issues with all of the rel values showing this error message: "Bad value 1 for attribute rel on element a: Not an absolute IRI. The string 1 is not a registere ...

What is the best way to restrict the length and number of lines in a textarea based on pixel dimensions?

I am looking to create a textarea where people can select different fonts, such as "sans-serif" and "serif", to type in text. I plan to have buttons labeled "sans-serif" and "serif" that will change the font of the textarea when clicked. However, there ar ...

Ensuring that the second level unordered list is set to a height of 100% of the first unordered list, rather than the

I'm working with this menu http://codepen.io/alexandernst/pen/oxpGYQ (I wanted to include it here but the result viewer on SO is causing some display issues...) and I am trying to ensure that the second and third level ul elements are the same height ...