Jump to content

Probably simple! TD height issue


Recommended Posts

im trying to create a really simple table layout to display my articles on my home page but am having a few problems with some TD heights in IEhere is what I have:

<table width="200" border="1">  <tr>    <td rowspan="2"><img><!-- set width/height --></td>    <td><h3>Title of Article - Some times spills onto second line because of table width</h3></td>  </tr>  <tr>    <td><p>Description of article goes here, and some times is a paragraph long meaning it will stretch the table much taller than the image on the left. But sometimes this section is short!</td>  </tr></table>

My problem is...... if i set a height of 1px on the <h3> table cell, firefox will make the cell as small as possible based on whats in it, IE8 heights seem random at bestWhat i want is..... the TD height of the H3 cell so be as small (height wise) as possible per occurrence so that it always looks like the paragraph below starts just after it - regardless of whether the H3 is one or two linesWhat im getting is:.... the articles that have a short title, one liners, the TD height is much taller than it needs to be, meaning there is a bigger gap to the paragraph cell below.How can I make a TD cell height shrink to the bare minimum based on its contents? ive checked padding settings and all sorts but it just seems this is how the cell wants to behave!!thanks :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...