How to center?

Hi! I think this is an easy one but I don’t know how to make it work…
I have this GoogleMap object (It just shows a Google Map), but it’s fixed size, and I want to make it adjust automatically to cover all screens sizes…

I hope you can help me. Thanks!

<app-map style="height:300px;width:320px;margin:12px;box-shadow:0 1px 1px black;align:center;"
center="basel"
zoom="15"
markers="whoiswhere" 

You need to remove the height:300px;width:320px; from the style attribute and use percents metrics like: height: 100%;width:100%;.

You can use this on the style tag, but for a good practice and let your code good to maintain I prefer to put all the styles in a css or sass file.

1 Like