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

Tips for creating a curved shape using fabric.js

I am encountering an issue while trying to draw an arc using a circle with a start and end angle in my code. Here is the snippet I am working with: var circle = new fabric.Circle({ radius: 30, left: 20, top: 20, fill: " ...

The Joys of Delayed Animation with jQuery Isotope

Has anyone successfully modified the CSS3 transitions in jquery Isotope to incorporate a delay for shuffling items, such as using "transition-delay: 0s, 1s;"? I am aiming for a specific shuffle direction - first left, then down - to create a more calculat ...

Modify the color of links when hovering using CSS

I am currently utilizing VScode and attempting to modify the link color on :hover. I am also interested in adding a grow Hover Effect. Here is my code snippet: .subareas a.link { margin: 0 0 10px 10px; float: right; height: 30px; line-height: 29 ...

Enhancing the appearance of a Textfield with PHP and HTML styling

How can I adjust the width and center text in a textfield within a container? <input type=text style=width:90%text-align:center value=" . $rows[mysql_field_name($sql_result, 3)] . "> Setting the width in the style attribute works when isolated like ...

Determine the height of a DIV element and its contents using JQuery

In this div, there are various elements present: <div class="menuItem designMenu" id="dMenu"> <ul class="menuList menu"> <li class="menuHeader">Design</li> <li class="projectHeader">Mother</li> <li clas ...

Display loading spinner and lock the page while a request is being processed via AJAX

Currently, I am working on a project using MVC in C#, along with Bootstrap and FontAwesome. The main objective of my project is to display a spinner and disable the page while waiting for an ajax request. Up until now, I have been able to achieve this go ...

What is the best way to show the response data in an input text field within an HTML form?

I'm new to working with node.js and I've encountered an issue. I need to display the data of the currently logged in user in input fields. With the following code, I can access the data of the logged-in user and display it on the console: See O ...

The hover state of a div will not be lost if its parent element is not being hovered over

When hovering over the second, third, or fourth item, hidden text will appear on the left side. If you hover your cursor over the hidden text, it will disappear again. I want to be able to hover over the second item, move my cursor to "hide", and click o ...

What is the best way to align the items in two lists at the center as if they were all individual

Q: How can I center the list-item elements of two unordered lists as if they were children of just one list? Example: {[1][1][1][1][2][2]} { [2][2] } CSS Alignment Challenge <div> <ul> &l ...

Utilizing Python to manipulate the 'select' tag in HTML

Currently, I am attempting to retrieve events from an HTML page located at In my efforts to choose different areas using python script, I encountered a challenge with the following snippet of HTML code: <select data-ng-options="key as value.name for ( ...

How can I make the row color of a jQuery datatable change when the row is selected?

One of my challenges involves implementing a jquery dataTable (view here) where each row contains a checkbox. I want the row's color to change when the checkbox is checked. This is the approach I attempted: <table id="tabellaOrdinaFarmaci" class=" ...

Struggling to send form data to the database

I've been working on sending form data to a database but for some reason, the data doesn't seem to be showing up when I check the database. Can anyone help me figure out what I'm doing wrong? I followed a tutorial on YouTube pretty closely, ...

Transitioning the image from one point to another

I am currently working on a unique single-page website and I have been experimenting with creating dynamic background animations that change as the user scrolls. Imagine my website is divided into four different sections, each with its own distinct backgro ...

"Troubleshooting: Why is my jQuery .load function returning an empty div when

Currently, I am developing a PHP control panel and I need a div in one of my PHP files to automatically refresh. After researching, I found a jQuery solution that can reload specific parts of a website automatically. However, the issue I am facing is that ...

What is the best way to share CSS styles between React and React Native?

Is it recommended to use inline CSS styles in a React / Next.js app to maintain code consistency across projects? For example, like this: import {StyleSheet, Dimensions} from 'react-native'; const vw = Dimensions.get('window').width / ...

What are the steps to create two frames using Twitter Bootstrap?

I'm just starting to work with Twitter Bootstrap and I need some help. Can someone assist me in creating a two-column layout inside the HTML, where the menu in the header stays visible even when scrolled down? I've included my HTML code below. Th ...

Creating a horizontal scrolling section for mobile devices using CSS

Looking to create a horizontal scroll area specifically for mobile devices, similar to the design seen here: https://i.sstatic.net/oSNqL.png Additionally, I want to hide the scrollbar altogether. However, when attempting to implement this, there seem to ...

Finding the Perfect Placement for an Element in Relation to its Companion

Is there a way to achieve an effect similar to Position Relative in CSS using jQuery? I have developed a tooltip that I want to attach to various objects like textboxes, checkboxes, and other text elements. My code looks something like this: <input i ...

"Get rid of the arrow in Bootstrap's dropdown menu

I'm currently using a bootstrap template that features an accordion menu. However, I have come across a scenario on one section of the page where I do not require the items to expand and show additional text, therefore, I would like to remove the arro ...

"Triggering an event after selecting and opening a file with an input of type file

Check out this snippet of HTML code: <input type="file" id="mysignature_upload" onChange="readURL();"/> We also have some Javascript code: function readURL(){ alert("Hello"); } A potential issue with this code is that the function readURL is on ...