Simply add the following css
li ul{
position:absolute; // if you don't apply this it'll push the other menu items to right
display:none;
}
li:hover ul{
display:block;
}
check this JSFiddle
Update
If you want the submenu to be vertical, remove the float:left
for li
and add the following
li {
display:inline-block;
}
li ul li{
display:block;
}
check this JSFiddle
3
solved Making drop down menus with CSS (Is is possible)? [duplicate]