Interactive maps not scaling correctly on tablet and mobile devices in Webflow is usually caused by fixed widths, missing responsive settings, or improper embed container styles.
1. Use a Responsive Embed Container
- Wrap your map embed (Google Maps, Leaflet, etc.) in a div block.
- Set the div block’s width to 100% and height to auto (or a fixed vh height like 50vh if vertical space is needed).
- Apply position: relative to the container if needed for absolute children.
2. Adjust the Embed Code
- In the Embed element, if your code has fixed
width and height attributes (like width="600"), remove them. - Instead, set style tags inline if needed:
style="width: 100%; height: 100%;". - Ensure Google Maps iframes or other embeds do not have fixed pixel values by default.
3. Style the Map Container with Flexibility
- Set your container div’s height appropriately per breakpoint:
- Mobile: Use relative units like
30vh or allow the height to expand as needed. - Tablet/Desktop: Use
50vh or maintain aspect-ratio using padding tricks (e.g., padding-top: 56.25% for 16:9). - Avoid setting overflow: hidden unless needed, as this can crop map interactions.
4. Add Custom CSS for Responsiveness (If Needed)
- If the map still doesn’t scale, add this inside an Embed element before the closing
</body> tag using Webflow's Page Settings > Custom Code > Footer: <style>.map-container iframe { width: 100% !important; height: 100% !important; }</style>- Apply the class
map-container to the div that wraps your embed.
5. Test Across Breakpoints
- Use Webflow's built-in responsive preview to test the layout.
- Make adjustments per breakpoint, especially for margin/padding or height constraints.
- Publish and check live across physical devices if possible—some scaling issues only appear on native mobile browsers.
Summary
To fix interactive map scaling on mobile/tablet in Webflow, wrap your map in a responsive div, remove fixed dimensions in the embed code, and ensure container styles allow scaling using width: 100% and responsive height settings. Use custom CSS targeting the iframe if necessary.