style width: 0px appears for Bootstrap4 Complex headers

style width: 0px appears for Bootstrap4 Complex headers

sunny_ssunny_s Posts: 31Questions: 2Answers: 0
edited August 2018 in Free community support

I'm using bootstrap 4 and would like to have two tr in thead. The top one will expand across all the td. But not sure why my table has a style width: 0px; which makes the table small, don't know where it come from?
How should I fix it?

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @sunny_s ,

    As shown in this example here, we're not setting the width of the table - in that example it's '100%', so it must be something in your config.

    We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • sunny_ssunny_s Posts: 31Questions: 2Answers: 0

    Hi Colin,

    Just bootstrap 4 dataTable itself works fine. That width: 0px appears only when I have two tr in thead

            <thead>
              <tr>
                <th>Customer</th>
                <th>Delivery Date</th>
                <th>Order</th>
                <th>Route</th>
                <th>Total</th>
              </tr>
            </thead>
    

    works fine.

    ===================================

            <thead>
              <tr>
                <th colspan="12" class="text-center">Inactive Recurring Orders</th>
              </tr>
              <tr>
                <th>Customer</th>
                <th>Delivery Date</th>
                <th>Order</th>
                <th>Route</th>
                <th>Total</th>
              </tr>
            </thead>
    

    has width: 0px.

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    I might be missing something but it seems to work here:
    http://live.datatables.net/huhuhalu/1/edit

    Kevin

This discussion has been closed.