"Shrink to fit" the content of the columns in a grid #4397
Answered
by
olets
gchumillas
asked this question in
Help
-
It is possible make the columns of a grid "shrink to fit" the content of the columns. Simply use the "auto" value: <!-- A 2x2 table -->
<div class="inline-grid" style="grid-template-columns: auto auto">
<!-- first row -->
<div>Small label</div>
<div>2</div>
<!-- second row -->
<div>Laaaarge label</div>
<div>4</div>
</div> But how can I translate |
Beta Was this translation helpful? Give feedback.
Answered by
olets
May 20, 2021
Replies: 1 comment
-
You can add your own additional https://tailwindcss.com/docs/grid-template-columns#customizing Demo: https://play.tailwindcss.com/Y7xQ1Olpj8 (see the HTML and Config tabs) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gchumillas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can add your own additional
grid-template-columns
classes by configuringgridTemplateColumns
.https://tailwindcss.com/docs/grid-template-columns#customizing
Demo: https://play.tailwindcss.com/Y7xQ1Olpj8 (see the HTML and Config tabs)