Essentially I’m trying to create the HTML/CSS for an auto-complete. I want it to look/behave roughly like the one here: http://www.skyscanner.com/ (type into From or To fields)
I’m not worrying about actually making the auto-complete work, I just want to create the HTML/CSS that it would use to show the list of text items generated by the auto-complete.
This is the basic layout I’m hoping to make:

Input box 1 and Input box 2 are what I currently have. When the user clicks in one of these input boxes, I want the corresponding auto-complete box (which at this point will show fake data) to appear.
Unfortunately I can’t think of how I would do something like this. Can anyone get me started or point me in the right direction?
The basic idea is to have a parent element that is positioned relatively to the page, but without moving it. Since this element is positioned (not static), you can position the suggest box absolutely relative to the parent element, under the text box. Since it is positioned absolutely, it does not affect document flow, a.k.a. it appears over other elements that are below the text box. Something like this should work:
HTML:
CSS:
This includes rounded borders as your image seems to show, using
border-radius. If that property is not available in a given browser, it should just use regular borders.Demo (includes text underneath): http://www.dstrout.net/pub/suggest.htm