DEV Community

Discussion on: How to use the Google Maps API with React.js

mardiansn profile image

Hey, thanks a lot for this post. But, How to set the maps to become 'position:relative' to my custom div? Cause it's kinda frustrating because it is by default 'position: absolute'. Thanks again!

reangeloj profile image
Re-Angelo Jarvis

Add a container around it. Set the container around it to position relative and 100% width, height.

div:first-of-type {
position: relative;
width: 100%;
height: 100%;