I know how to set border color and background color and all, but for some reason my table doesn't have those lines in between each cell. Its just all one color. Errrrrrr. Thanks in Advance!where are you setting the border? table? tr? td?nvm, fixed that little problem. now I only have to fix the width of cells.. anyone know how?Suggest you use column groups (<!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/struct/tables.html#h-11.2.4">http://www.w3.org/TR/html4/struct/tables.html#h-11.2.4</a><!-- m -->) and set the widths as desired for the columns. Here's an example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>
<title>Page title</title>
<style type="text/css">
<!--
table#test {
width: 700px;
margin: 0 auto;
border-collapse: collapse;
border: solid 2px navy;
}
#test th, #test td {
border: solid 1px black;
padding: 2px 4px;
}
#test td {
vertical-align: top;
}
col#one {
width: 6em;
}
col#two {
width: 120px;
}
col#three {
background-color: aqua;
}
-->
</style>
</head>
<body>
<table id="test" summary="test table">
<colgroup>
<col id="one">
<col span="2" id="two">
<col id="three" width="0*">
</colgroup>
<tr>
<th>Col. 1</th>
<th>Col. 2</th>
<th>Col. 3</th>
<th>Col. 4</th>
</tr>
<tr>
<td>fixed width in ems</td>
<td>fixed width in pixels</td>
<td>same width as preceding column</td>
<td>rest of the remaining space</td>
</tr>
<tr>
<td>fixed width in ems</td>
<td>fixed width in pixels</td>
<td>same width as preceding column</td>
<td>rest of the remaining space</td>
</tr>
</table>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>
<title>Page title</title>
<style type="text/css">
<!--
table#test {
width: 700px;
margin: 0 auto;
border-collapse: collapse;
border: solid 2px navy;
}
#test th, #test td {
border: solid 1px black;
padding: 2px 4px;
}
#test td {
vertical-align: top;
}
col#one {
width: 6em;
}
col#two {
width: 120px;
}
col#three {
background-color: aqua;
}
-->
</style>
</head>
<body>
<table id="test" summary="test table">
<colgroup>
<col id="one">
<col span="2" id="two">
<col id="three" width="0*">
</colgroup>
<tr>
<th>Col. 1</th>
<th>Col. 2</th>
<th>Col. 3</th>
<th>Col. 4</th>
</tr>
<tr>
<td>fixed width in ems</td>
<td>fixed width in pixels</td>
<td>same width as preceding column</td>
<td>rest of the remaining space</td>
</tr>
<tr>
<td>fixed width in ems</td>
<td>fixed width in pixels</td>
<td>same width as preceding column</td>
<td>rest of the remaining space</td>
</tr>
</table>
</body>
</html>