 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
hl_world
Joined: 28 Feb 2008 Posts: 3
|
Posted: Thu Feb 28, 2008 3:13 pm Dividing tables |
|
|
|
I have a table that measures 100 cells by 50 (no kidding) but I want to apply a sort of intercellular border every 10 cells horizontally and vertically. How would I do this without destroying my large table and putting its data in 50 independant tables?
Thanks |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8315 Location: Castle Pines North, CO USA
|
Posted: Thu Feb 28, 2008 3:41 pm |
|
|
|
You can create a style that applies a border to certain cells - maybe something like
| Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>Untitled 3</title>
<style type="text/css">
td
{
width:20px
}
td.intercellular
{
border: 2px solid #000;
}
</style>
</head>
<body>
<table style="width: 100%">
<tr>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
</tr>
<tr>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
</tr>
<tr>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
</tr>
<tr>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
</tr>
<tr>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
</tr>
</table>
</body>
</html> |
_________________
Corey
Payment Processing Forums | Mile High Merchant Accounts | Expression Web Blog |
|
hl_world
Joined: 28 Feb 2008 Posts: 3
|
Posted: Thu Feb 28, 2008 7:04 pm |
|
|
|
Well I already have like 20 different classes for the fields and each cell is seperately by a black line of 1 pixel instead of cellspacing (I think this is the default). This is the structure of the file:
| Code: |
classes (including backgrounds, cell borders, text size etc.)
[table]
row 1 (each row is 100 cells)
row 2
row 3
etc for 47 more.
[/table]
|
But I was wondering how to apply cellspacing that seperated the table into 10x10 sections but still be 1 table in code |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8315 Location: Castle Pines North, CO USA
|
Posted: Fri Feb 29, 2008 7:26 am |
|
|
|
You can apply another class to tds
| Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>Untitled 3</title>
<style type="text/css">
td
{
width:20px
}
td.intercellular
{
border: 2px solid #000;
}
td.anotherone
{
background-color:#cccccc;
}
</style>
</head>
<body>
<table style="width: 100%">
<tr>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular anotherone">lorem ipsum</td>
<td>lorem ipsum</td>
</tr>
<tr>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular anotherone">lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
</tr>
<tr>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td class="intercellular anotherone">lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td>lorem ipsum</td>
</tr>
<tr>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular anotherone">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
</tr>
<tr>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
<td>lorem ipsum</td>
<td class="intercellular">lorem ipsum</td>
</tr>
</table>
</body>
</html> |
Cellpadding is only in a <table> element, not <td>. You can use styles those to create padding / margin though to specific <td>.
_________________
Corey
Payment Processing Forums | Mile High Merchant Accounts | Expression Web Blog |
|
hl_world
Joined: 28 Feb 2008 Posts: 3
|
Posted: Fri Feb 29, 2008 4:22 pm |
|
|
|
| So there's no way to do this without changing each td data lines individually? Well, thanks anyway. |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8315 Location: Castle Pines North, CO USA
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|