nav { position: relative; font-family: NothingYouCouldSay; font-size: 21px; z-index: 1; } nav ul { position: absolute; } nav > ul { width: 900px; display: table; table-layout: fixed; } nav > ul > li:first-child > a { border-top-left-radius: 10px; border-bottom-left-radius: 10px; } nav ul ul li:last-child a { border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; } nav > ul > li:last-child a:first-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; } nav li { display: table-cell; margin-bottom: 0px; margin-left: 0px; } nav li:before { content: "" !important; margin-left: 0px !important; } nav ul ul li { display: block; float: none; min-width: 150px; } nav a { text-align: center; color: white; text-decoration: none; display: block; margin-left: 1px; margin-right: 1px; } nav > ul > li > a { height: 50px; line-height: 50px; background-color: #333333; } nav a:hover { text-decoration: none; } nav > ul > li:hover > a { background-color: #777777; } nav ul ul a { transition: opacity 0.2s ease; visibility: hidden; opacity: 0; height: 0px; line-height: 0px; background-color: #EEEEEE; padding: 0 20px; color: black; } nav ul li:hover a { visibility: visible; opacity: 1; height: 50px; line-height: 50px; } nav a:hover { transition: all 0.2s ease; background-color: #777777; color: white; }