# Allow Map to fill Map Container

**URL:** <https://community.plotly.com/t/allow-map-to-fill-map-container/91283>\
**Category:** Dash Python\
**Created:** [March 17, 2025, 2:59pm UTC](https://community.plotly.com/t/allow-map-to-fill-map-container/91283 "2025-03-17T14:59:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tangedahl](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@tangedahl](https://community.plotly.com/u/tangedahl)\
**Post date:** [March 17, 2025, 2:59pm UTC](https://community.plotly.com/t/allow-map-to-fill-map-container/91283/1 "2025-03-17T14:59:10Z")

</div>

How can I set my map to fill more of the map.container? If I force it changing map.gl in CSS then the hover components are offset. Setting the style in the app.py file doesn’t affect this size.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/d/4/d4164ff739ce38c82af44a8cfcddab0ec2f018f4.png)

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [March 17, 2025, 3:42pm UTC](https://community.plotly.com/t/allow-map-to-fill-map-container/91283/2 "2025-03-17T15:42:22Z")

</div>

Hello @tangedahl,

You need to adjust the margins in the layout. 🙂

---

<div class="post-metadata">

**Author:** ![tangedahl](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@tangedahl](https://community.plotly.com/u/tangedahl)\
**Post date:** [March 17, 2025, 4:09pm UTC](https://community.plotly.com/t/allow-map-to-fill-map-container/91283/3 "2025-03-17T16:09:45Z")

</div>

I was able to figure it out without CSS, this needs to go in the DIV tag for the Map Container.

config={  
‘displayModeBar’: True,  
‘scrollZoom’: True,  
# Force the map to take size from container  
‘responsive’: True  
},

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [March 17, 2025, 4:28pm UTC](https://community.plotly.com/t/allow-map-to-fill-map-container/91283/4 "2025-03-17T16:28:41Z")

</div>

What I meant by margins was the actual margins argument in the graph…

> **[Setting](https://plotly.com/python/setting-graph-size/#adjusting-height-width--margins-with-plotly-express)**
>
> Detailed examples of Setting Graph Size including changing color, size, log axes, and more in Python.
