locked
Table "TR" not working RRS feed

  • Question

  • User1892050643 posted

    Hi there,

    Plese to help me

    <table id="table-Traveling" class="budgetTraveling-table table table-bordered table-sm" style="width: 1200px">
    <thead class="thead-inverse">
    <tr>
    <th class="stiky-col bg-white" style="background: #fff !important; border: 0 !important; width:50px; left: 0;"></th>
    </tr>
    <tr>
    <th class="stiky-col" style="width:50px; left: 0px;">No</th>
    <th class="stiky-col" style="width:50px; left: 50px;">No</th>
    </tr>
    </thead>
    <tbody class="tbody">
    <tr id="tr-material" data-row="">

    <td class="stiky-col stiky-no" style="width:50px; left: 0px;">
    <input id="row-material-no-" type="text" class="form-control" readonly="" value="1">
    </td>
    <td class="stiky-col stiky-no" style="width:50px; left: 50px;">
    <input id="row-material-no-" type="text" class="form-control" readonly="" value="2">
    </td>
    </tr>
    </tbody>
    </table>

    like code that,
    why not new row when i use "TR" but that row just one line with header row

    Thanks before

    Sunday, March 22, 2020 12:03 AM

All replies

  • User415553908 posted

    The only issue i see with your table layout is the first header row seems to not span over two columns as all others do:

    This is easy to fix with colspan="2" in your case: 

    <th colspan="2" class="stiky-col bg-white" style="background: #fff !important; border: 0 !important; width:50px; left: 0;">TEST</th>

    If I missed your point and you are after something else - please elaborate a bit more

    Sunday, March 22, 2020 9:31 AM
  • User-1716253493 posted

    Seem like inline style causing the problem. 

    Sunday, March 22, 2020 10:45 PM
  • User1535942433 posted

    Hi Indra JRN,

    Accroding to your description,I don't understand your requirment clearly.The new row need characters or height to space for tr.

    Do you want to show characters in header row?

    More details,you could refer to below codes:

    1.No characters in header row:

    <thead class="thead-inverse">
                        <tr>
                            <th colspan="2" class="stiky-col bg-white" style="background: #000 !important; border: 0 !important;left: 0;height:50px"></th>
                        </tr>
                        <tr>
                            <th class="stiky-col">No</th>
                            <th class="stiky-col">No</th>
                        </tr>
                    </thead>

    Result:

    2. Have characters in header row:

     <thead class="thead-inverse">
                        <tr>
                            <th colspan="2" class="stiky-col bg-white" style="background: #FFF !important; border: 0 !important;left: 0;">Header</th>
                        </tr>
                        <tr>
                            <th class="stiky-col">No</th>
                            <th class="stiky-col">No</th>
                        </tr>
                    </thead>

    Result:

    Best regards,

    Yijing Sun

    Monday, March 23, 2020 2:27 AM