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

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -