You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, 10 rows + 1 col grid (grid cell #1 takes 1st row grid cell #2 takes 2nd~9th rows, and last grid cell takes 10th row). If only grid cell #1 has contents (other 2 grid cells <div> have not yet coded), then grid cell #1 will take the full height of screen even though row-span-1 is in place. Demo code from Tailwind CSS Playground is here.
I want to setup the placeholder even though contents are not yet added, assure 1st grid cell only & always takes desired height. is using h-1/10 class the best practice to achieve so ?
Below Post makes me think whether using grid is recommended / best practice when developing the major layout of webpage. perhaps I should use flex ?
The issue with using flex for grids (which let's be honest is hardly an issue, flex is amazing 😍), is that the margins are don't count as part of the columns. Meaning, you'll get 1/3 + 1/3 + 1/3 plus your margins, which is over 100%. This is causing the wrapping you're seeing.
As you've just noted, you just need to use negative margins and padding:
The text was updated successfully, but these errors were encountered:
tian-yan
changed the title
The issue with using flex for grids (which let's be honest is hardly an issue, flex is amazing 😍), is that the margins are don't count as part of the columns. Meaning, you'll get 1/3 + 1/3 + 1/3 plus your margins, which is over 100%. This is causing the wrapping you're seeing.
Fixed height for grid cell
May 23, 2021
tian-yan
changed the title
Fixed height for grid cell
row-span-1 not working for grid cell
May 23, 2021
For example, 10 rows + 1 col grid (grid cell #1 takes 1st row grid cell #2 takes 2nd~9th rows, and last grid cell takes 10th row). If only grid cell #1 has contents (other 2 grid cells
<div>
have not yet coded), then grid cell #1 will take the full height of screen even thoughrow-span-1
is in place.Demo code from Tailwind CSS Playground is here.
I want to setup the placeholder even though contents are not yet added, assure 1st grid cell only & always takes desired height. is using
h-1/10
class the best practice to achieve so ?Below Post makes me think whether using grid is recommended / best practice when developing the major layout of webpage. perhaps I should use flex ?
The text was updated successfully, but these errors were encountered: