Bootstrap 4 Responsive Table loading smaller than it should

Bootstrap 4 Responsive Table loading smaller than it should

mthompson_codmthompson_cod Posts: 3Questions: 1Answers: 0

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

  • kthorngrenkthorngren Posts: 21,172Questions: 26Answers: 4,923

    Try using style="width:100%" as shown in this example.

    Kevin

  • mthompson_codmthompson_cod Posts: 3Questions: 1Answers: 0

    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.

  • allanallan Posts: 63,212Questions: 1Answers: 10,415 Site admin
    Answer ✓

    I think it looks like it is working for me at the moment?

    Allan

  • mthompson_codmthompson_cod Posts: 3Questions: 1Answers: 0

    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

This discussion has been closed.