...

View Full Version : Bordering blocks of <td>



name _F1
09-23-2006, 08:45 AM
Is there a way to put a border around blocks of <td>'s, that spread across multiple rows, short of having a new table for each block?

If you don't understand what I mean, I took the liberty of drawing a simple picture, where the entire image is the table:

http://img171.imageshack.us/img171/4824/tablefe7.gif

I'm not sure how this could be achieved without simply making a big table, with each block of <td>'s as a smaller table, which I want to avoid if possible.

_Aerospace_Eng_
09-23-2006, 09:10 AM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<style type="text/css">
html, body {
margin:0;
padding:0;
}
#container {
width:636px; /* total width of .boxhold table * # of boxes */
margin:auto;
}
.boxhold {
float:left;
}
.boxhold table { /* total width = width + (margin * 2) + 2 */
border:1px solid #000;
width:200px;
margin:5px;
}
.boxhold table td {
border:1px solid #000;
margin:5px;
}
.clear {
clear:both;
line-height:0px;
font-size:0;
}
</style>
</head>
<body>
<div id="container">
<div class="boxhold">
<table border="0" cellpadding="0" cellspacing="5">
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</div>
<div class="boxhold">
<table border="0" cellpadding="0" cellspacing="5">
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</div>
<div class="boxhold">
<table border="0" cellpadding="0" cellspacing="5">
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</div>
<div class="clear">&nbsp;</div>
</div>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum