I want to build a menu with a dropdown selection, using Semantic UI.

It works great on desktop, because it seems to be predicated on hovering.

However, on mobile, given there is no hover, I can't get it to drop down.

How do I get it to work based on clicking, not just hovering?

<!DOCTYPE html>
<html>
<head>
<title>Puzzles</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=yes">
<link rel="stylesheet" type="text/css" href="CSS.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css">
</head>

<body>
<div class="ui menu">
<div class="header item"><a href="https://www.myPuzzleSite.com">Puzzles</a></div>
<div class="right menu">
        <div class="ui simple dropdown item">
            <div class="text">Unsolved Puzzles</div>
            <i class="dropdown icon"></i>
            <div class="menu">
                <div class="item"><a href="https://www.google.com">Puzzle 1</a></div>
                <div class="item"><a href="https://www.google.com">Puzzle 2</a></div>
                <div class="item"><a href="https://www.google.com">Puzzle 3</a></div>
            </div>
        </div>  
</div>
</div>

</body>
</html>

0 Answers