To make it work as a vertical menu, just make some minor adjustments. If you want to add more style to it, that's also easily achievable.
For a detailed example, check out this fiddle HERE
#menu
{
width: 120px;/*adjust width*/
}
#menu li
{
display: block; /*keep it as a block element*/
}
#menu ul
{
top: 0; /*make changes here */
left: 100%; /*make changes here */
}
#menu ul li:first-child > a:after
{
content: '';
position: absolute;
left:-13px; /* adjust this value*/
top:7px; /* adjust this value*/
width: 0;
height: 0;
border: 5px solid transparent; /* tweak this value*/
/*border-right: 5px solid transparent;*/ /*this line is not needed*/
border-right: 8px solid #444; /* modify this value*/
}
#menu ul li:first-child a:hover:after
{
border-right-color: #04acec; /* change the color here*/
}
I've included comments on what to specifically modify in order to achieve your desired outcome. Feel free to experiment further!