So far I've tried to use this code:
CSS Code:
/*global*/
html,
body {
width: 100;
margin: 10;
padding: 10;
font-family: Avenir, sans-serif;
}
/*functions*/
.multi-level,
.item ul,
.nav input[type="checkbox"] {
display: none;
}
#menu:checked ~ .multi-level,
.item input:checked ~ ul {
display: block;
}
HTML :
<body>
<p style="font-family: 'Avenir'; text-align: center">
"What is this website about?" Info about select Macs and frequently asked
questions.
</p>
<div class="nav">
<input type="checkbox" id="menu" />
<label for="menu">☰</label>
</div>
<div class="multi-level">
<div class="item">
<input type="checkbox" id="A" />
<label for="A">Mac Mini</label>
<ul>
<li><a href="#">2005-2006 (PPC)</a></li>
<li><a href="#">2006-2010 (Polycarbonate Mini*)</a></li>
<li><a href="#">2010-2018 (Aluminium Mini*)</a></li>
<li><a href="#">2020-Present (M1 Mini)</a></li>
</ul>
</div>
</div>
</body>
The dropdown menu isn't working for some reason, I've tried adding visibility: visible;
and visibility: show;
doesn't seem to do anything.
I've tried to use Firefox and Safari, doesn't work on either of them could it be a browser related issue?
Note: I'm on the latest versions of both of them.