Page is a not externally linkable
- Code, Content, and Presentation
-- HTML
---- Table cell


Adam5000 - 7:24 pm on Oct 18, 2011 (gmt 0)


For purpose of example I've got a single cell table (the actual table is bigger) with a picture in it. And when I add the doctype code, space is added to the bottom of the cell. I think adding the doctype code is a good idea but I don't want the space at the bottom.

How do I remove the space?

Help!

Below are two sets of code. They're both the same except the second one has the doctype added and this creates a space at the bottom of the cell.

This code produces the desired result.

<html>
<head>

<title>
Test
</title>

<style type="text/css">
td
{
border-style: solid;
border-width: 3px;
}
</style>

</head>

<body>

<table>
<tr>
<td>
<img src="test.jpg">
</td>
</tr>
</table>

</body>
</html>

And this code puts space at the bottom of the cell.

<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>

<title>
Test
</title>

<style type="text/css">
td
{
border-style: solid;
border-width: 3px;
}
</style>

</head>


<body>

<table>
<tr>
<td>
<img src="test.jpg">
</td>
</tr>
</table>

</body>
</html>


Thread source:: http://www.webmasterworld.com/html/4376132.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com