Steve Steve - 1 year ago 75
HTML Question

Limit height of <td> element even if text in same table is longer

So this is what I have.

As you can see from most of the posts in the thread (the first three), the postbit (blue box with avatar inside) looks fine.

However, the fourth postbit is elongated vertically because of the longer post content.

How would one go about keeping the postbit size the same even if there is a massive amount of text? Trust me, I've tried EVERYTHING for about 2 hours now...

Answer Source

You needs to use DIV inside you avatar TD, and this DIV must be styled as your current blue TD. TD will play the role of transparent container

Let's explain. Now you have:

  <td class="avatar"><!-- Avatar block here --></td>
  <td>Post text</td>

You needs:

  <td class="container">
    <div class="Avatar><!-- Avatar block here --></td>
  <td>Post text</td>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download