Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set openlayers map height 100%

In openlayers when am trying to set map height: 100%; the map itself not displaying. When setting height: 800px; like this its showing white space in some resolution and scroller in some resolution. So i want to do it like it can adjust height automatically. But height: 100%; not helping.

<div id="map" style="height: 100%; width:100%; float:left; position: absolute;"> 
</div>

How do i solve this issue?

like image 339
Teja Maridu Avatar asked Mar 12 '26 16:03

Teja Maridu


1 Answers

This is a simple solution.

<div id="map" style="width: 100%; height: 100%; position:fixed">
</div>
like image 170
Teja Maridu Avatar answered Mar 14 '26 08:03

Teja Maridu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!