I have a table in HTML structured like this:
<tbody>
<tr class="grid_row_content">
<td class="gridCell">
<div class="componentswitcher">
<div style="display:none;"></div>
</div>
</td>
</tr>
<tr class="grid_row_spacer"></tr>
<tr class="grid_row_content">
<td class="gridCell">
<div class="componentswitcher">
<div style="display:none;"></div>
</div>
</td>
</tr><tr class="grid_row_spacer"></tr>
</tbody>
For the spacing between two tr elements, I am using a tr class "grid_row_spacer" with CSS {height:4px}. It retains its height even when the tr above it is empty and has no height. However, I need a CSS solution for "grid_row_spacer" that will adjust its height based on whether the preceding tr element is empty or not.
Your suggestions are welcome.