.menu-button { background-color: purple; display: inline-block; width: 2.5em; height: 2.5em; line-height: 2.5em; text-align: center; font-size: 1rem; position: relative; display: inline-block; } div.menu-button > span { color:white; } .card { position: absolute; top: 3rem; right:0; padding:0.5rem; min-width: 10rem; } .username { white-space: nowrap; font-weight: 500; font-size: 1.2rem; line-height: 1.2rem; } .card-body { text-align: left; } .hidden { display: none; }