Looking for a CSS-only method to arrange an ordered list (ol
) into two columns if it exceeds the height of its container. The number of items in the list can vary, and so can the height of the container.
When attempting to set li
with properties like width:50%
and float:left
, the list ends up in two columns but some items appear next to each other instead of below one another.
The goal is to achieve the following layout:
- abcdef 4. abcdef
- abcdef 5. abcdef
- abcdef