HTML - make the cells the same height
March 7, 2009 11:11 PM Subscribe
HTML - Why aren't these two table cells the same height?
I want this HTML to display with the image and text side-by-side, with the size of the image and the size of the text block cell to be the same height. If you display this html in Explorer 6 or Firefox 3 on Windows XP, the text block is taller. Why, and how would I make them the same height--i.e. the exact height of the image, 117 pixels.
The original html is being generated by TinyMCE in Joomla 1.0. This simpler version has all the Joomla gunk stripped out, but still has the key html and renders incorrectly--the right hand (3rd) cell in the second row of the table is taller than the first cell containing the image.
I've changed all the angle brackets to brackets so the ask wysiwyg editor doesn't render the html:
[!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"]
[head]
[title]TEST[/title]
[/head]
[body]
[table border="0" cellpadding="0"]
[tbody][tr][td colspan="3"]HERE IT IS[/td][/tr]
[tr style="height:117px"]
[td style="width: 94px; height: 117px"][img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Robin_Hood_Memorial.jpg/180px-Robin_Hood_Memorial.
jpg" width="94" height="117" /][/td]
[td style="background-color: #ffffff; width: 1px"] [/td]
[td style="font-size: 8px; line-height: 2.0; color: #ffffff; background-color: #000000; height: 117px; width:
94px"]Why[br /]on earth[br /]doesn't this[br /]work?[/td][/tr][/tbody][/table]
[/body]
[/html]
I want this HTML to display with the image and text side-by-side, with the size of the image and the size of the text block cell to be the same height. If you display this html in Explorer 6 or Firefox 3 on Windows XP, the text block is taller. Why, and how would I make them the same height--i.e. the exact height of the image, 117 pixels.
The original html is being generated by TinyMCE in Joomla 1.0. This simpler version has all the Joomla gunk stripped out, but still has the key html and renders incorrectly--the right hand (3rd) cell in the second row of the table is taller than the first cell containing the image.
I've changed all the angle brackets to brackets so the ask wysiwyg editor doesn't render the html:
[!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"]
[head]
[title]TEST[/title]
[/head]
[body]
[table border="0" cellpadding="0"]
[tbody][tr][td colspan="3"]HERE IT IS[/td][/tr]
[tr style="height:117px"]
[td style="width: 94px; height: 117px"][img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Robin_Hood_Memorial.jpg/180px-Robin_Hood_Memorial.
jpg" width="94" height="117" /][/td]
[td style="background-color: #ffffff; width: 1px"] [/td]
[td style="font-size: 8px; line-height: 2.0; color: #ffffff; background-color: #000000; height: 117px; width:
94px"]Why[br /]on earth[br /]doesn't this[br /]work?[/td][/tr][/tbody][/table]
[/body]
[/html]