Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do OpenLayers map height 100% on bootstrap

I want to 100% of the height.

    <div class="container-fluid">
        <div class="row">
            <div id="map" 
              style="width: 100%; height: 300px; border: 1px solid #ccc;">
            </div>
        </div>
    </div>

working code is here. The pixel size is worjking for height but persentage(%) size is not working.

like image 724
barteloma Avatar asked Aug 13 '14 08:08

barteloma


1 Answers

You can try position fixed or absolute.

<div id="map" 
     style="width: 100%; height: 100%; position:fixed">
</div>
like image 162
bayramucuncu Avatar answered Oct 29 '22 12:10

bayramucuncu