how to align search input fields when target is tfoot

how to align search input fields when target is tfoot

Mwhite007Mwhite007 Posts: 15Questions: 5Answers: 0

i have my column control search fields in the footer but i want the box on the left of the column if it's text and aligned right if it's numeric (same as body)

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 65,653Questions: 1Answers: 10,919 Site admin

    The default is for them to take 100% width - what CSS are you using to restrict the width (so I can try the same and see what is going on). A link to a test case showing the issue would be really useful.

    Allan

  • Mwhite007Mwhite007 Posts: 15Questions: 5Answers: 0

    I think the problem was that i had a non-breaking space in the footer columns and that created a "Title" attribute which was putting an empty block on the wrong side of the input. when i remove the non-breaking space inside the th tags. my editor changes the color from blue to red so i thought i had to have something there:
    the old way:

            <tfoot>
              <tr class="subHeading">
                <th class="narrow">&nbsp;</th>
                <th class="narrow">&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th><!--- 5 --->
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th><!--- 10 --->
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th><!--- 15 --->
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th><!--- 20 --->
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th><!--- 25 --->
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th><!--- 30 --->
                <th>&nbsp;</th>
             </tr>
            </tfoot>
    

    the new way:

            <tfoot>
              <tr class="subHeading">
                <th class="narrow"></th>
                <th class="narrow"></th>
                <th></th>
                <th></th>
                <th></th>
                <th></th><!--- 5 --->
                <th></th>
                <th></th>
                <th></th>
                <th></th>
                <th></th><!--- 10 --->
                <th></th>
                <th></th>
                <th></th>
                <th></th>
                <th></th><!--- 15 --->
                <th></th>
                <th></th>
                <th></th>
                <th></th>
                <th></th><!--- 20 --->
                <th></th>
                <th></th>
                <th></th>
                <th></th>
                <th></th><!--- 25 --->
                <th></th>
                <th></th>
                <th></th>
                <th></th>
                <th></th><!--- 30 --->
                <th></th>
              </tr>
            </tfoot>
    

  • allanallan Posts: 65,653Questions: 1Answers: 10,919 Site admin
    Answer ✓

    Ah! Yes, DataTables would keep the nbsp as the title. Good to hear you got it sorted out.

    Allan

Sign In or Register to comment.