Adminlte: Add a div height:100% inside the #content div

Created on 21 Apr 2015  路  5Comments  路  Source: ColorlibHQ/AdminLTE

I am Trying to use a leaflet map http://leafletjs.com/ in my content pane.

Please how can i get the map, or any div content to be 100% of the content pane?

question

Most helpful comment

Thanks, i have resolved it.
For anyone else having this issue you may try:

setTimeout(function () { map.invalidateSize() }, 500);

<script type="text/javascript">
    $(document).ready(function () {
        var contentHeigh = $("body > #wrapper").height() - 100;
        $('#map').css("height", contentHeigh + "px");
    });
</script>

All 5 comments

Hi,

You will have to use javascript. Since the template depends on javascript to initiate the layout sizes, it won't be responsive to CSS. To have a div with a height of the window, you can use this code:

var window_height = $(window).height(),
      header_height = $(".main-header").height();
$("#myDiv").css("height", window_height - header_height);

Hi,

I doesn't find the listing view with

tag in AdminTLE please try to help me if you are getting my issue.

@ajaykorat I don't understand your issue. Please open a new issue with full explanation of the problem. Thanks.

Thanks, i have resolved it.
For anyone else having this issue you may try:

setTimeout(function () { map.invalidateSize() }, 500);

<script type="text/javascript">
    $(document).ready(function () {
        var contentHeigh = $("body > #wrapper").height() - 100;
        $('#map').css("height", contentHeigh + "px");
    });
</script>
Was this page helpful?
0 / 5 - 0 ratings