In my coding project, I have implemented forms with a structure that utilizes display:table-row
and display: table-cell
. Previously, in Firefox 52, I was able to hide a cell element using visibility:hidden
, effectively hiding the cell while maintaining the CSS-defined structure (as opposed to using display:none
).
However, upon testing in Firefox 64 (and also Chrome), I noticed that when I hide the visibility of the cell, the parent table-row loses its background color at that specific position.
The code snippet below captures this issue:
#tableRow{
display: table-row;
background-color: #f5f5f5;
}
.cell{
display:table-cell;
}
#hide{
visibility:hidden;
}
<div id="tableRow">
<a href="#" class="cell">Visible</a>
<a href"#" class="cell"id="hide">Not visible</a>
<a href="#" class="cell">Visible</a>
</div>
I experimented with using opacity: 0
, but found that certain elements remain clickable or trigger different events, rendering opacity ineffective in this scenario.
Do you have any suggestions or insights on this matter? Is this behavior intentional?