# Problem when container div is invisible at first

**URL:** <https://community.thinkgeo.com/t/problem-when-container-div-is-invisible-at-first/8306>\
**Category:** MVC\
**Created:** [December 6, 2016, 10:25am UTC](https://community.thinkgeo.com/t/problem-when-container-div-is-invisible-at-first/8306 "2016-12-06T10:25:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![reza\_assar](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/71e660/32.png) [@reza\_assar](https://community.thinkgeo.com/u/reza_assar)\
**Post date:** [December 6, 2016, 10:25am UTC](https://community.thinkgeo.com/t/problem-when-container-div-is-invisible-at-first/8306/1 "2016-12-06T10:25:11Z")

</div>

I have some popups which will load with style of “display:none”.  
These DIVs should contain maps, But I’m experiencing some problem with maps when popup shows up.  
for instance:

- `map.HeightInPixels` is equals to zero (when returns to server side).
- Mis-location of marker’s context menu .

Is there any work around? OR i should change the way all popups showing?

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [December 7, 2016, 8:07am UTC](https://community.thinkgeo.com/t/problem-when-container-div-is-invisible-at-first/8306/2 "2016-12-07T08:07:11Z")

</div>

Hi Reza,

I think if you set the control disabled, invisible or hidden, that shouldn’t get initialized correct.

I am not sure why you need to hide the map when page loaded, but I think if that’s necessary, maybe you can try to load map with very small size or iframe.

Regards,

Don
