I'm trying to use this: https://developers.google.com/maps/documentation/javascript/places#places_autocomplete. How do I control the width of the input text box? And how do I control the width of the drop down menu?
问问题
3347 次
1 回答
4
The input has the searchTextField
id, so this simple css rule would do the trick:
#searchTextField {
width: 500px;
}
The drop down menu will scale accordingly, but if you want to change it you should add:
.pac-container {
width: 700px !important;
}
The !important
is needed because the width is applied inline to the dropdown using the style
attribute, and this can't be overriden.
于 2012-07-11T11:28:30.190 回答