javascript - how to remove space at the bottom for dynamic contents? -
i designing page bottom part of div should touch end of page no bottom margin or padding put height of main div as
$(function() { $('.divmain').css({'height': (($(window).height())) + 'px'}); $(window).resize(function() { $('.divmain').css({'height': (($(window).height())) + 'px'}); }); }); my html :
<div class="divmain"> <table id="edugrid"></table> </div> where "edugrid" generated dynamically(bootstrap).
initially work fine have contents in div can added @ user end(add new education etc) contents moving outside main div , looking wired.
check full screen result - http://fiddle.jshell.net/drrsn/1/show/light/
check fiddle code - http://jsfiddle.net/drrsn/1/
css
html,body{width:100%;height:100%; overflow:hidden; margin:0;padding:0;} div{background:blue;} table{background:pink;height:100%;;width:50%} html
<div class="divmain"> <table id="edugrid"></table> </div> js
$(function() { $('.divmain').css({'height': (($(window).height())) + 'px'}); $(window).resize(function() { $('.divmain').css({'height': (($(window).height())) + 'px'}); }); }); hope u looking for.
Comments
Post a Comment