I’m new to HTML. I have a table and a map canvas (Google Maps API) side by side. I’m trying to add a button under the map canvas to set the zoom/center of the map to default. Problem is I don’t know the correct syntax to position it.
<body>
<div>
<table border="1", id="myTable", cellpadding="10", style="float:left">
<tr>
<th>Name of Business</th>
<th>Latitude</th>
<th>Longitude</th>
<th>Center Map</th>
</tr>
</table>
<div id="map_canvas" style="float:right;width:1024px;height:600px;border:black">
</div>
<button onclick="map.setCenter(myOptions.center), map.setZoom(9)", style="float:bottom">Recenter Map</button>
</div>
</body>
Right now the “Recenter Map” button is at the top and in between the table and map canvas.
this is not related to google maps api.
its basic html.
you should’ve tried google first.
anyway, add a
<br>break after thediv.ok, since you’re knew, lets do a quick analysis of your code.
<table border="1", id="myTable",)style="float:left")display: inline-block.</div>in your code.