html - Google Maps Javascript API ignore CSS for input field -


after loading map, css ignored <#map .map-control1 / #map .map-control2>.

i realized there no way set parameters pure css.

so how fix it?

<!doctype html> <html>   <head>     <meta charset="utf-8">     <style>       #map {height: 100%;}       #map .map-control1 {top: 0px;}       #map .map-control2 {top: 50px;}       #origin-input, #destination-input {text-overflow: ellipsis;}      </style>   </head>   <body>     <input id="origin-input" class="map-control1" type="text"         placeholder="origin">     <input id="destination-input" class="map-control2" type="text"         placeholder="destination">     <div id="map"></div>     <script>     function initmap() {       var map = new google.maps.map(document.getelementbyid('map'), {         maptypecontrol: false,         center: {lat: -23.0013, lng: -43.3861},         zoom: 17       });     </script>     <script src="https://maps.googleapis.com/maps/api/js?key=_dsdsds&callback=initmap"     async defer></script>   </body> </html> 

.map-controls cascading #map. remove desired styles.

.map-control1 { /* without #map */   top: 0px; }  .map-control2 { /* without #map */   top: 50px; } 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -