Question on the shorthand of the column-count and column-width properties.
Guys, how does this shorthand of the 'column-count' and 'column-width' properties work? I'm trying to understand but in practice I don't see any difference. Example: columns: 3 120px; When I use these values, will I have 3 columns of 120px? How it works?
12 Replies
When I don't use the column-count property and just use the column-width this is what happens:
When I use both properties:
In this case, when I use both properties, does column-width work as if it were min-width?
it will work as an "ideal" column width, so it can be wider or even narrower.
same for column count. it's an ideal.
if both are set (not auto), then column count is used as a maximum
here the mdn page: https://developer.mozilla.org/en-US/docs/Web/CSS/columns
columns - CSS: Cascading Style Sheets | MDN
The columns CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths.
Thank you, W3Schools does not explain this detail.
w3schools is nice for starters, but when you want to know the real magic behind things, mdn is the place
I'll follow the tip
good luck!