Hi, I’m trying to understand how the “VW” unit works.
Using 100vw should make the element (data cells of the table in this case) fit the entire viewport. But instead of that, these cells are upsized without overflowing the “TH” of each row. So, the width won’t ever be 100vw. Why do we need to use it? Can’t we use only “width-min: 4rem”?
How are related the vw units to the other objects? I mean the container and the parent table or section?
I copy one of the “tests” I did by changing the bg color to view the cell’s sizes.
td {
width: 1vw;
background-color: red;
border: 10px solid black;
}
Why this makes all the cells of different widths? See below (I point in green the different sizes):