Closed gfargo closed 8 years ago
Have you tried differently (ie percent?). We had issues with it.
Ah, :+1: you are correct. There are issues if you are expecting this to work with a map container that has the following CSS rules;
position: relative
display: block
I found that when using the map as a background element with a position: fixed
the height variable at 100% preforms exactly how one would expect.
:bulb: Maybe document that the issue exists given these CSS properties & therefore you should almost always use px as your height? That way If you wanted to make a full height background element behind all your content you wouldn't have to override the style="height: 400px"
with an !important
in my CSS.
:beers: Cheers!
:+1:
Currently the height variable only can accept static pixel values; This is less than optimal for anyone who wants to add 'inherit' or a percentage height value.
Curious if you had specific reasoning behind adding the 'px' postfix in the
init()
within the/yii2-leaflet-extension/src/widgets/Map.php
widget?