Note that there are some explanatory texts on larger screens.

plurals
  1. POMap not taking up whole of div
    primarykey
    data
    text
    <p>I'm using geocoding to display a google map with the users location displayed. I'm looking the map to be situated with a sliding menu. The problem I have is when you open out the sliding menu the map only takes up a small area in the top left corner, but as soon as you resize the browser window the map takes up the full area like I want it to. This happens no matter what way you resize the browser window even by making it smaller. Let me know if you need to see more of my code than this:</p> <p>Sliding menu function</p> <pre><code>$(document).ready(function() { $(".content").hide(); //updated line, removing the #panel ID. $('#tab').toggle(function() //adding a toggle function to the #tab { $('#panel').stop().animate( { width:"800px", opacity:0.8 //to adjust width of bar } , 500, function() //sliding the #panel to 200px { $('.content').fadeIn('slow'); //slides the content into view. }); }, function() //when the #tab is next cliked { $('.content').fadeOut('slow', function() //fade out the content { $('#panel').stop().animate( { width:"0", opacity:0.1 //slide the #panel back to a width of 0 } , 500); }); }); }); </code></pre> <p>Sliding menu html</p> <pre><code>&lt;div id="panel"&gt; &lt;div class="content"&gt; &lt;div id="mapContainer"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>CSS</p> <pre><code>#tab { width: 30px; height: 100px; position: fixed; left: 0px; top: 100px; display: block; cursor: pointer; background-color: #ff0000; border-top-right-radius: 20px; border-bottom-right-radius: 20px; } #panel { position: fixed; left: 0px; top: 50px; background-color: #ffffff; height: 500px; width: 0px; border-top-right-radius: 20px; border-bottom-right-radius: 20px; } #mapContainer { height: 500px; width: 800px; border:10px solid #eaeaea; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload