I learned here: Multi columns list by css how to make a self adjusting multi column list. However there is one problem left: The container doesn't adjust it's width to it's content: https://jsfiddle.net/rkofktdz/3/
ul {
    height: 40px;
    display:inline-flex;
    flex-direction: column;
    flex-wrap: wrap;
    border: 2px solid black;
    background-color: grey;
    padding: 0;
}
li {
    list-style: none;
}
a {
    display: inline-block;
    width: 60px;
}    <ul>
    <li><a href="#">item 1</a></li>
    <li><a href="#">item 2</a></li>
    <li><a href="#">item 3</a></li>
    <li><a href="#">item 4</a></li>
    </ul>I can extend the container (ul) by applying a fixed width but I would like to have it self adjusting. This is part of a three level menu being a bit more complex: http://nachrichtentisch.de/
 
     
    