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:
16
root.css
16
root.css
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user