wilsonf1 Posted April 11, 2010 Share Posted April 11, 2010 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 More sharing options...
Ingolme Posted April 12, 2010 Share Posted April 12, 2010 I'd try removing margins from the <h3> element first. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.