Bootstrap 4 Responsive Table loading smaller than it should
Bootstrap 4 Responsive Table loading smaller than it should

https://codext.ci.davenport.ia.us/building_permit/index.php
Hi all, as you can see if you test with the link above, my responsive datatable is loading with a fixed width of 956 pixels when the page is loaded with no data on a PC. Once data is searched (enter "Kimberly" for instance in the street field and perform search) the table loads fine at full width. This page is based on the start bootstrap freelancer theme if that might make a difference. Is there a way I can tell datatables to load at 100% width in that space? Or do I maybe have something goofed up in the css that might be breaking things?
Any thoughts are most appreciated,
Thanks all!
Matt
This question has an accepted answers - jump to answer
Answers
Try using
style="width:100%"
as shown in this example.Kevin
Thanks kthorngren for the reply!
I can now see in dev tools that adding the style inline to the table tag makes the table load with width: 100%; on the element itself instead of width: 956px; but there is unfortunately no change in the initially loaded width.
I think it looks like it is working for me at the moment?
Allan
Yes Allan, thank you very much for taking a look. Yes, I got it figure out the other night. Appears to have been a silly mix of custom css in the freelancer theme. I set width 100% and removed a disply: block element and all is well.
Thanks again!
Matt