JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<div id="wrapper">
- Select a Reason -
<ul>
<li>Sexual Content</li>
<li>Violent or Repulsive Content</li>
<li>Hateful or Abusive Content</li>
<li>Harmful or Dangerous Acts</li>
<li>Child Abuse</li>
<li>Spam</li>
<li>Infringes My Rights</li>
</ul>
</div>
<p id="display">← Click an option.</p>
</body>
</html>
CSS
* {
font-family: "Verdana";
font-size: 11px;
}
#wrapper {
width: 200px;
position: relative;
background-color: #ddd;
padding: 5px 10px;
/*border: 1px solid #bbb;*/
float: left;
}
#display {
float: left;
padding-left: 20px;
padding-top: 5px;
}
#wrapper:hover ul {
display: block;
}
ul {
display: none;
position: absolute;
width: 220px;
top: 0;
left: 0;
border: 1px solid #ddd;
}
li {
background-color: white;
cursor: pointer;
padding: 5px 10px;
border-bottom: 1px solid #ddd;
}
li:last-child {
border-bottom: none;
}
li:hover {
background-color: #cef;
}