I have a <dl>
like so:
<dl>
<dt id="a_1">Quantity:
<dd id="a_2">
<dt id="b_1">Size:
<dd id="b_2">
<dt id="c_1">Rise:
<dd id="c_2">
<dt id="d_1">Color:
<dd id="d_2">
....
</dl>
This list is generated dynamically through php. I have a container of a certain height. What is the best way to make this list into two columns when it gets too large? If possible, I would like to keep it as a dl though it's not absolutely necessary.
If it helps at all, I'm using bootstrap.
The most elegant way would be to use the CSS columns properties:
http://codepen.io/cimmanon/pen/tcyHv
dl {
columns: 2;
}
dd {
break-before: avoid;
}
Support for it is fairly good, but Firefox doesn't honor the break-before
property (which is being used to prevent the definition from ending up in a different column from its term). Adding prefixes may be necessary.
http://caniuse.com/#feat=multicolumn
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With