Search box hint dropdown?

Hi all. I have a form that has an input field labeled state/country and when the user starts typing in a state/country, a box appears below it providing hints of states/countries, like the google.com search box. Does anyone know of any good tutorials for how this can be done. I’ve got it a little bit, but it’s giving me serious alignment issues. I’m using absolute positioning along with z-index, but it’s real buggy. Any help would be appreciated.

Jesse