Removing space between cells in table

B

Bundy

Sorry for asking this but I cannot seem to get rid of the space between
the cells.

I have search various websites and newsgroups. I bet it is something
obvious.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Testing</title>

</head>

<body>
<table width="100%" height="400">
<tr>
<td bgcolor="#00FF33" border="0" cellpadding="0"
cellspacing="0">&nbsp;</td>
<td bgcolor="#FFFF00" border="0" cellpadding="0"
cellspacing="0">&nbsp;</td>
<td bgcolor="#FF00FF" border="0" cellpadding="0"
cellspacing="0">&nbsp;</td>
</tr>
</table>
</body>
</html>

Regards

Bundy
 
L

Luigi Donatello Asero

Bundy said:
Sorry for asking this but I cannot seem to get rid of the space between
the cells.

I have search various websites and newsgroups. I bet it is something
obvious.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Testing</title>

</head>

<body>
<table width="100%" height="400">
<tr>
<td bgcolor="#00FF33" border="0" cellpadding="0"
cellspacing="0">&nbsp;</td>
<td bgcolor="#FFFF00" border="0" cellpadding="0"
cellspacing="0">&nbsp;</td>
<td bgcolor="#FF00FF" border="0" cellpadding="0"
cellspacing="0">&nbsp;</td>
</tr>
</table>
</body>
</html>

Regards

Bundy


Url?
 
J

Jonathan N. Little

Bundy said:
Sorry for asking this but I cannot seem to get rid of the space between
the cells.

I have search various websites and newsgroups. I bet it is something
obvious.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Testing</title>

</head>

<body>
<table width="100%" height="400">
<tr>
<td bgcolor="#00FF33" border="0" cellpadding="0"
cellspacing="0">&nbsp;</td>
<td bgcolor="#FFFF00" border="0" cellpadding="0"
cellspacing="0">&nbsp;</td>
<td bgcolor="#FF00FF" border="0" cellpadding="0"
cellspacing="0">&nbsp;</td>
</tr>
</table>
</body>
</html>

CSS to the rescue! Stop trying to do it with presentational markup and
learn about stylesheets:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Using CSS</title>

<style type="text/css">
TABLE { border-collapse: collapse; width: 100%; height: 400px; }
.example1 {color: #000000; background-color: #00ff33;}
.example2 {color: #000000; background-color: #ffff00;}
.example3 {color: #000000; background-color: #ff00ff;}
</style>
</head>
<body>
<table>
<tr>
<td class="example1">&nbsp;</td>
<td class="example2">&nbsp;</td>
<td class="example3">&nbsp;</td>
</tr>
</table>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top