display: block;
color: white;
text-align: center;
+text-decoration: none;
+cursor: pointer;
+}
+
+/* Hide the checkbox */
+.dropdown input[type="checkbox"] {
+display: none;
+}
+
+/* Style the label like the dropdown text */
+.dropdown label {
+display: block;
+color: white;
+text-align: center;
padding: 14px 16px;
text-decoration: none;
cursor: pointer;
top: 100%;
left: 0;
border-radius: 0 0 10px 10px;
+list-style-type: none;
+padding: 0;
+}
+
+.dropdown-content li {
+float: none;
+width: 100%;
}
.dropdown-content a {
display: block;
text-align: left;
}
-
.dropdown-content a:hover {
-
}
-
.dropdown-content a:last-child {
border-radius: 0 0 10px 10px;
}
-.dropdown:hover .dropdown-content {
+/* Show dropdown when checkbox is checked */
+.dropdown input[type="checkbox"]:checked ~ .dropdown-content {
display: block;
}
+/* Keep the hover functionality for desktop */
+.dropdown:hover .dropdown-content {
+display: block;
+}
.dropdown:hover {
-
}
/*