I have a dynamic table that I generate after getting some inputs from the user to present some tabular data. I need to know if there is away to assign a fixed height for the cells even if some of them have some content / text. I would like all the cells to have 30px height regardless if they have content or if they are empty.
This is the CSS I have:
table {
width: 90%;
height:100%;
}
table th, table td {
border: 1px solid gray;
height:30px !important;
padding: 9px !important;
width: 16%;
}
The table is generated by this code:
foreach ( $this->rows as $i => $row ) {
$tbody_tr = NHtml::el ('tr class="data-row-' . $i . '"');
foreach ( $this->fields as $field ) {
$tbody_tr->add(NHtml::el ('td')->class($field['name'])->setHtml(@$row[$field['name']]));
}
But when I have a cell that has some text, the cell height expands anyway. Any ideas?