How do I set the row height in dataTables

How do I set the row height in dataTables

srini_attulurisrini_attuluri Posts: 8Questions: 0Answers: 0
edited September 2012 in DataTables 1.9
Actually, I am scrolling through the table but behaing in a wierd manner as the row are having different heights.
Can you please help me out.

Replies

  • BLSullyBLSully Posts: 24Questions: 1Answers: 0
    In your css do something like:

    [code]
    .dataTables tbody tr {
    min-height: 35px; /* or whatever height you need to make them all consistent */
    }
    [/code]
  • srini_attulurisrini_attuluri Posts: 8Questions: 0Answers: 0
    Thank you very much!! very fast response.
  • vivekmd06vivekmd06 Posts: 7Questions: 0Answers: 0
    Hi,
    I wanted a fixed row height too, so I tried the above solution. However, each td element contains data which is overflowing, comes to the next line & consequently increases the height of the row. Is there a way to fix the height of the row.
    I also tried to insert a div element inside the function & use the foll css:-

    table#example tbody td div{
    width:160px;
    height:28px;
    overflow:hidden;
    word-wrap:break-word;
    }

    It did fixed the height & width of the div element inside the td element, but caused a break in the nTd variable & hence also the iRow variable remained undefined. Any workaround would be appreciated.

    Thanks for looking.
  • btBillbtBill Posts: 31Questions: 0Answers: 0
    #tableId tbody > tr > td {
    white-space: nowrap;
    }

    I'm having to use this for the scroller plugin.
This discussion has been closed.