Search code examples
cssdrupal-7pdf-generationmpdf

specifying height attribute for a td in table


I want to give height for a td in table structure. I am using this in creating pdf by mpdf generator in drupal.
I tried giving inline css to td but not reflecting at all. so please help me regarding this.
My requirement is like i want fixed td, it should not change depend upon the data length inside of that.


Solution

  • By default table-layout is set to auto. You need to set the table-layout to fixed to get it working for fixed td width/height:

    table{
       table-layout: fixed;
    }