I am currently working on designing a stylish menu that expands to display the available options, but I am encountering challenges with the CSS. Specifically, I am struggling to make the sub-menu pop out from the city name seamlessly.
CSS
ul { margin : 80px 0 0 0; padding: 0; white-space : nowrap;}
li a { padding-left: 10px; }
li {
display : block;
padding : 2px 10px 2px 40px;
margin : 0 0 15px 0;
background : #929292;
width : 0;
overflow : hidden;
cursor : pointer;
-webkit-transform: rotate(0deg) translateX(0px);
-webkit-transition: all 0.33s linear 0s;
-moz-transform: rotate(0deg) translateX(0px);
-moz-transition: all 0.33s linear 0s;
}
li:hover {
background : #fff; width: 180px;
-webkit-transform: rotate(0deg) translateX(0px) translateY(0px);
-moz-transform: rotate(0deg) translateX(0px) translateY(0px);
}
HTML
<ul>
<li>Florence<a href="flo.php">Florence</a></li>
<li>Tuscumbia<a href="tusc.php">Tuscumbia</a></li>
<li>Muscle Shoals<a href="ms.php">Muscle Shoals</a></li>
<li>Sheffield<a href="shef.php">Sheffield</a></li>
</ul>