Hi
I have added a Google map element.
I would like that the element adapt the height to be responsive but I can’t add 100% height the element need a px height.
Could yo help me?
Thanks advance,
BR,
Antonio.
Hey Antonio,
Thank you for the inquiry.
You can try setting the map’s height for different screen sizes using css media queries.
Example:
@media only screen and (max-width: 1366px) {
/* Add your Mobile Styles here */
#top .av-2x5yv-2e4c878dbdd4546c1985e0573793e047 .av_gmaps_sc_main_wrap .avia-google-map-container {
height: 700px !important;
}
}
@media only screen and (max-width: 989px) {
/* Add your Mobile Styles here */
#top .av-2x5yv-2e4c878dbdd4546c1985e0573793e047 .av_gmaps_sc_main_wrap .avia-google-map-container {
height: 655px !important;
}
}
@media only screen and (max-width: 480px) {
/* Add your Mobile Styles here */
#top .av-2x5yv-2e4c878dbdd4546c1985e0573793e047 .av_gmaps_sc_main_wrap .avia-google-map-container {
height: 455px !important;
}
}
Best regards,
Ismael
Hi Ismael,
Many thanks. Works perfect!
BR,
Antonio.
Hi,
Great, I’m glad that Ismael could help you out. We’ll close this thread for now then, please open a new thread if you should have any further questions or problems.
Best regards,
Rikard
