When creating a horizontal nav bar, what is the best way to create a drop down menu within the nav bar?

I have been reading and it seems depending on what one reads, it says simply be using CSS and others say that using JavaScript would be best.

Thoughts on this?