If you do not want to randomly deal with absolute positions, this is the way when you click on a text field, it displays a drop-down menu. I did not add in javascript to hide the dropdown menu when you click again, but this should be pretty easy to do.
<html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> function showDrop(){ $('#select').attr('size',3); $("#select").show(); } function populateTextBox(){ var val = $("#select option:selected").text(); $("#input").val(val); } </script> </head> <body> <div id="container"> <input id="input" name="" type="" style="width: 100px;" onclick="showDrop();" /> <br> <select id="select" name="" style="display:none;width: 100px;" onclick="populateTextBox();"> <option value="Value for Item 1" title="Title for Item 1">Item 1</option> <option value="Value for Item 2" title="Title for Item 2">Item 2</option> <option value="Value for Item 3" title="Title for Item 3">Item 3</option> </select> </div> </body> </html>
source share