Center the dropdown text relative to its parent, also make sure that the button text stays on a single line.

This commit is contained in:
2024-03-22 22:24:45 -05:00
parent 1a4d72666b
commit c54d4c97f8
2 changed files with 21 additions and 11 deletions

View File

@@ -109,18 +109,28 @@ ul {
position: relative;
display: inline-block;
border-radius: 2%;
margin: 0 auto;
}
.dropdown-content {
position: absolute;
display: none;
padding: 10px;
z-index: 10;
background-color: rgba(0,0,0,0.6);
margin: auto;
text-align:center;
left: 50%;
transform: translateX(-50%);
}
.dropdown:hover .dropdown-content {display: grid;}
.dropdown:hover .dropdown-content {
display: grid;
}
.dropdownButton {
white-space: nowrap;
}