Autocomplete div under textfield
In my site I have a text field that has to function as a autocomplete box.
I use this code:
<input type="text" class="input2" style="margin-bottom:0px;"
id="customersearchfield">
<div id="customersearchresult" style="display:none; position:absolute;
z-index:999; background:#fff; color:black; ">
CSS:
.input2{
display: inline;
margin-top: 4px;
padding: 3px;
border: 0px;
width: 200px;
}
This does not work as expected. The resultdiv is placed directly under the
textfield vertically, but not aligned horizontally. It just aligns to the
left side of the browser window.
How to get the top left corner of the resultdiv directly under the bottom
left corner of the text field so that it appears directly under the
textfield?
No comments:
Post a Comment