Etwas fragmentarisch, damit's übersichtlich bleibt (sozusagen zum »Selber ausmalen«).
<div class="beispiel-css-menue"> <ul class="ul-menu"> <li class="close"> <label class="label" for="close"> X <input id="close" name="mainmenu" type="radio"></label> </li> <li class="li-menu"> <label class="label" for="kuchen"><b>❦</b> Kuchen <input id="kuchen" name="mainmenu" type="radio"> <ul class="sub"> <li>festliche Torten</li> <li>Schokoladensahne</li> <li>Nusskuchen Emma</li> <li>Eissplitter Natur</li> </ul> </label> </li> <li class="li-menu"> <label class="label" for="gebäck"><b>❦</b> Gebäck <input id="gebäck" name="mainmenu" type="radio"> <ul class="sub"> <li>Sonntagsbrötchen</li> <li>Nussplätzchen</li> <li>Feinster Lebkuchen</li> <li>Mandelbiscuit</li> <li>Caramel Muffin</li> </ul> </label> </li> <li class="li-menu"> <label class="label" for="brot"><b>❦</b> Brote <input id="brot" name="mainmenu" type="radio"> <ul class="sub"> <li>Tiroler Steinofen</li> <li>Paderborner</li> <li>Feiertagsstuten</li> </ul> </label> </li> </ul> </div>
<style> .beispiel-css-menue { position: relative; padding-top: 10px; padding-right: 10px; } .beispiel-css-menue ul { list-style-type: none; padding-left: 1rem; } .beispiel-css-menue ul li:not(:last-child) { border-bottom: 1px dotted silver; } .beispiel-css-menue li.close { position: absolute; color: red; font-weight: bold; right: 20px; top: 40px; z-index: 1000; } .li-menu { background: #333; padding: 1rem; border-bottom: 1px dotted #fff; color: #fff; } .sub { max-height: 0; overflow: hidden; } .sub li { padding: 1rem 0.5rem; } input[name="mainmenu"] { display: none; } input[name="mainmenu"]:checked + .sub { max-height: 1000px; overflow: visible; } @media (min-width: 720px) { .ul-menu { display: flex; } .li-menu { position: relative; width: 30%; } .sub { position: absolute; background: #444; padding-right: 2rem; padding-left: 1rem; } } </style>