Drop-down html css
/* Dropdown container */
.dropdown {
position: relative;
display: inline-block;
}
/* Dropdown button */
.dropdown-button {
background-color: #007bff;
color: white;
padding: 8px 12px;
border: none;
cursor: pointer;
border-radius: 5px;
}
/* Dropdown menu (hidden by default) */
.dropdown-menu {
position: absolute;
background-color: white;
min-width: 150px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
border-radius: 5px;
list-style: none;
padding: 0;
margin-top: 5px;
}
/* Dropdown items */
.dropdown-menu li {
padding: 10px;
text-align: left;
}
.dropdown-menu a,
.dropdown-menu button {
width: 100%;
display: block;
text-decoration: none;
color: black;
background: none;
border: none;
cursor: pointer;
padding: 10px;
text-align: left;
}
.dropdown-menu a:hover,
.dropdown-menu button:hover {
background-color: #f1f1f1;
}
/* Delete button style */
.delete-btn {
color: red;
}
/* Dropdown container */
.dropdown {
position: relative;
display: inline-block;
}
/* Dropdown button */
.dropdown-button {
background-color: #007bff;
color: white;
padding: 8px 12px;
border: none;
cursor: pointer;
border-radius: 5px;
}
/* Dropdown menu (hidden by default) */
.dropdown-menu {
position: absolute;
background-color: white;
min-width: 150px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
border-radius: 5px;
list-style: none;
padding: 0;
margin-top: 5px;
}
/* Dropdown items */
.dropdown-menu li {
padding: 10px;
text-align: left;
}
.dropdown-menu a,
.dropdown-menu button {
width: 100%;
display: block;
text-decoration: none;
color: black;
background: none;
border: none;
cursor: pointer;
padding: 10px;
text-align: left;
}
.dropdown-menu a:hover,
.dropdown-menu button:hover {
background-color: #f1f1f1;
}
/* Delete button style */
.delete-btn {
color: red;
}
dropdownOpen = false;
toggleDropdown() {
this.dropdownOpen = !this.dropdownOpen;
}