.menu { font-family: 'Roboto', sans-serif; position: fixed; top: 0; left: 0; margin: 0; padding: 0; height: 100vh; width: 60px; list-style-type: none; background: rgb(252, 220, 171, 0.85); overflow: hidden; transition: width .3s; } .menu:hover { width: 300px; } .menu nav { display: flex; flex-direction: column; justify-content: center; align-items: start; } .menu nav a { display: flex; flex-direction: row; align-items: center; justify-content: space-between; margin: 15px 30px 0 5px; border-radius: 5px; height: fit-content; width: 250px; } .menu nav a { font-size: .9rem; text-decoration: none; margin: 15px 5px 5px 5px; padding: 5px; } .menu nav a div { color: #4b0611; } .menu nav a:hover, .menu nav:first-child a { background: #dd3328; } @media screen and (max-width: 600px) { .menu { width: 45px } .menu a img { width: 20px; height: 20px; } }