Briefly
The columns
shortcut allows you to specify values for the column
and column
properties simultaneously, setting the number and width of columns.
Example
Let's set two columns of text at 500 px:
div { columns: 2 500px;}
div { columns: 2 500px; }
How it works
You can specify the number of columns, the width of the columns, or both values at the same time. The value that is not explicitly specified is set to auto
. The order of the values can be any. The browser will understand that an integer without a unit is the number of columns, while a number with a unit is the width of the column.