For an HTML game website I display several UL lists at the bottom of every page:
<h2>How to play?</h2>
<ul>
<li><a href="/en/ws/google">Via Google</a></li>
<li><a href="/en/ws/apple">Via Apple</a></li>
<li><a href="/en/ws/facebook">Via Facebook</a></li>
<li><a href="/en/ws/amazon">Via Amazon</a></li>
<li><a href="/en/ws/huawei">Via Huawei</a></li>
</ul>
Currently the lists are just displayed one above the other:
In some Wordpress themes I can see that the lists are displayed near each other when the webpage is wide enough:
Could someone please recommend a CSS trick for doing it?
It is difficult to understand how Wordpress is doing it and I have also tried searching, but the keywords are too common to find good pointers for my problem.
UPDATE:
I have followed the now deleted (why?) suggestion by Majicman02 (thank you!) and have tried using Flexbox:
#footer {
display: flex;
flex-wrap: wrap;
}
<div id="footer">
<h2>How to play?</h2>
<ul>
<li><a href="/en/ws/google">Via Google</a></li>
<li><a href="/en/ws/apple">Via Apple</a></li>
<li><a href="/en/ws/facebook">Via Facebook</a></li>
<li><a href="/en/ws/amazon">Via Amazon</a></li>
<li><a href="/en/ws/huawei">Via Huawei</a></li>
</ul>
<h2>Mobile game version</h2>
<ul>
<li><a href="/en/ws/android">For Android</a></li>
<li><a href="/en/ws/ios">For iOS</a></li>
</ul>
<h2>Where to talk?</h2>
<ul>
<li><a href="https://facebook.com/groups/12345/">At Facebook</a></li>
</ul>
<h2>Other languages</h2>
<ul>
<li><a href="/de/ws">My word game (German)</a></li>
<li><a href="/ru/ws">My word game (Russian)</a></li>
</ul>
<h2>Legal documents</h2>
<ul>
<li><a href="/en/ws/tos">Terms of service</a></li>
<li><a href="/en/ws/privacy">Privacy policy</a></li>
<li><a href="/de/ws/imprint">Impressum</a></li>
<li><a href="/de/ws/dsgvo">Datenschutzerklärung</a></li>
</ul>
</div>
And the result looks good in the sense that the full webpage width is used.
But how to keep the h2-header above the ul-lists please?