I have created a on hover dropdown and used a form as is its content but when ever I try to hover down into the contents the button disappers.How can I fix this ? this seems to be working perfectly in windows devices however I am using safari
.dropbtn {
background-color: #000000;
color: white;
padding: 16px;
font-size: 16px;
border: none;
}
.dropdown {
float: right;
position: relative;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
z-index: 100000;
}
.dropdown-content a:hover {
background-color: whitesmoke;
}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown:hover .dropbtn {
background-color: whitesmoke;
color: orangered;
}
<div class="width">
<div class="dropdown">
<button class="dropbtn">Web Page color</button>
<form action="">
<div class="dropdown-content">
<label for="color">Page Color:</label>
<input
type="color"
name="color"
id="color"
value="#fde6ee"
onchange="changecolor()"
/>
</div>
</form>
</div>
</div>