HTML: How to increase tables' overall height if they are side-by-side? -
i have followed following guide (https://stackoverflow.com/a/45672648/2402577) put tables side-by-side. output tables' heights not symmetric , not able make change both tables' height (i prefer increase tables' displayed row number hence having longer table).
my source code, please note using bootstrap:
<div class="container" id="coverpage"> <div class="row"> <div class="col-md-6 col-sm-12"> <table id="tableblock" class="display"><caption><h3 style="color:black;">latest blocks</h3></caption></table> </div> <div class="col-md-6 col-sm-12"> <table id="tabletxs" class="display" ><caption><h3 style="color:black;">latest transactions</h3></caption></table> </div> </div> </div>
as can see first table's displayed row number 2. in original should 5 (when comment out <div class="col-md-6 col-sm-12">
).
[q] how make both tables' overall height larger (increase the row number displayed) , make both tables symmetric?
thank valuable time , help.
i realize mistake. when increase scrolly
: value solved problem, defined under $(document).ready(function())
.
example:
$(document).ready(function() { $.get("btabl", function(result){ $('#tableblock').datatable( { data: result, scrolly: 800, //i increased value. paging: false, info: false, searching: false, order: [[ 0, "desc" ]], columndefs: [ { targets: [0,1], render: function ( data, type, row, meta ) { if(type === 'display'){ data = " " + data ; data = data.replace(/(@@(.+)@@)/,'<a onclick="a_onclick(' + "'" + "$2" + "'" + ')">' + "$2" + '</a>') ; // data = '<a onclick="a_onclick(' + "'" + encodeuricomponent(data) + "'" + ')">' + data + '</a>'; // data = '<a href="search/' + encodeuricomponent(data) + '">' + data + '</a>'; } return data; } }, {classname: "dt-center", "targets": [0,1,2,3]} ], columns: [ { title: "block" }, { title: "mined by" }, { title: "time" }, { title: "txs" } ] }) }) } ) ;
Comments
Post a Comment