css - how to make leaflet map height variable -
in application making div of map as
<div id="map" style="height: 610px; width:100%"></div> but make map responsive want make height 100%, if make height: 100% not working.
how can make height variable width map can seen on device.
demo : http://jsfiddle.net/ccyp6/
if change height & width of map not map.
you need set parent elements height: 100%; first
html, body { height: 100%; } demo (this won't work no parent height defined)
explanation: why need that? when specify element's height in % 1st question arises is: 100% of what? default, div has height of 0px, 100% div won't work, setting parent elements height 100%; work.
Comments
Post a Comment