Adjust table dynamically until fixed size
See original GitHub issuei have a basic table
<table id="table" data-search="true" data-show-columns="true" data-pagination="true" data-height="250">
...
</table>
when we put a value for height, table seem to take this space as if there is only element…
Is it possible to take all the height only when there are enough element in the table?
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Fit table that has dynamic size inside div with fixed size
I have a square table whos size changes dynamically(For example, 2*2/3*3/4*4). I want to fix this dynamically changing table inside a div ...
Read more >list manipulation - Dynamically change the size of table
Dynamically change the size of table · Just create a new matrix every time instead of put the new data into a fixed...
Read more >I want to adjust the width of the dynamic columns to a fixed size
Hi I have a table which is growing dynamically depending upon the data that is coming from the objects. Here i have a...
Read more >How to set fixed width for <td> in a table ? - GeeksforGeeks
Using width attribute: The <td> tag has width attribute to control the width of a particular column. By assigning a numeric value to...
Read more >table-layout - CSS: Cascading Style Sheets - MDN Web Docs
Table and column widths are set by the widths of table and col elements or by the width of the first row of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@fanshaoer
http://jsfiddle.net/dndph7c3/1/
You can dynamically set the height using that function. You can check if the height is greater using get height or count the data and dynamically set the height.
@xyluet here is your updated fiddle http://jsfiddle.net/dhvddove/1/
Adding these CSS styles solved it: