Cell borders

windows

Guest
Is there a way to put a border on one side of a cell in a table? Basically what I want to do is outline a group of cells in one table.<br />
<br />
Sharp<!--content-->no you can't, but you can add another table in that cell and make the border that way.<!--content-->scoutt's suggestion (nesting) is probably the best-supported approach;<br />
you could also use CSS (the *wave of the future*):<br />
<br />
<br />
<html><br />
<head><br />
<title>title</title><br />
<style type="text/css"><br />
<br />
.boxLeft {width:100%; height:100%; border-bottom: 5px #ff0000 groove; border-left: 5px #ff0000 groove; border-top: 5px #ff0000 groove;} <br />
.boxRight {width:100%; height:100%; border-top: 5px #ff0000 groove; border-right: 5px #ff0000 groove; border-bottom: 5px #ff0000 groove;} <br />
.boxTop {width:100%; height:100%; border-left: 5px #ff0000 groove; border-top: 5px #ff0000 groove; border-right: 5px #ff0000 groove;} <br />
.boxBottom {width:100%; height:100%; border-left: 5px #ff0000 groove; border-bottom: 5px #ff0000 groove; border-right: 5px #ff0000 groove;} <br />
.boxLR {width:100%; height:100%; border-left: 5px #ff0000 groove; border-right: 5px #ff0000 groove;} <br />
.boxTB {width:100%; height:100%; border-top: 5px #ff0000 groove; border-bottom: 5px #ff0000 groove;} <br />
<br />
td {font:bold 16px monospace;}<br />
<br />
</style><br />
</head><br />
<body bgcolor="#000000"><br />
<div align="center"><br />
<table width="90%" height="90%" cellspacing="0" cellpadding="0" <br />
style="border:5px gold inset;"><br />
<tr><br />
<td width="20%" height="25%" bgcolor="coral"></td><br />
<td width="20%" height="25%" bgcolor="olive"></td><br />
<td width="20%" height="25%" bgcolor="beige"></td><br />
<td width="20%" height="25%" bgcolor="pink"></td><br />
<td width="20%" height="25%" bgcolor="paleyellow"><div class="boxTop">.boxTop</div></td><br />
</tr><tr><br />
<td width="20%" height="25%" bgcolor="peru"><div class="boxLeft">.boxLeft</div></td><br />
<td width="20%" height="25%" bgcolor="gray"><div class="boxRight">.boxRight</div></td><br />
<td width="20%" height="25%" bgcolor="darkgreen"></td><br />
<td width="20%" height="25%" bgcolor="skyblue"></td><br />
<td width="20%" height="25%" bgcolor="moccasin"><div class="boxLR">.boxLR</div></td><br />
</tr><tr><br />
<td width="20%" height="25%" bgcolor="palegreen"></td><br />
<td width="20%" height="25%" bgcolor="cornflowerblue"></td><br />
<td width="20%" height="25%" bgcolor="gold"></td><br />
<td width="20%" height="25%" bgcolor="goldenrod"></td><br />
<td width="20%" height="25%" bgcolor="aqua"><div class="boxBottom">.boxBottom</div></td><br />
</tr><tr><br />
<td width="20%" height="25%" bgcolor="darkred"></td><br />
<td width="20%" height="25%" bgcolor="sienna"></td><br />
<td width="20%" height="25%" bgcolor="black"></td><br />
<td width="20%" height="25%" bgcolor="crimson"></td><br />
<td width="20%" height="25%" bgcolor="violet"></td><br />
</tr><br />
</table><br />
</div><br />
</body><br />
</html><!--content-->what does NS4.x think of that, there _mrkite???<!--content-->there will be a show tonight on trampolines......um, sorry, couldn't resist.....<br />
<br />
Actually, a simple cut and paste and I found out that it is quite different. In Explorer you get a 5 x 4 array of multi-coloured rectangles with the relevant cells outlined with a red border. <br />
In the 'other browser' 4.5 you get a black screen with the cells appearing to be floating in the correct spaces with no border at all. <br />
All in all a very good example of differences in rendering between two different browsers.<!--content-->thanks Android, I would have done that but I don't have NS loaded at work ;)<!--content-->being loaded at work is what I do best. ;););););)<!--content-->...Henry the Horse told me:<br />
<br />
Put a <br> in the empty cells and the table will render fine - just no inside borders. NS4 doesn't support the shorthand border-top: (etc.) properties; you have to specify all three properties, and, if memory serves, the likelihood of all that typing being rewarded with something resembling a web page is nilsville. I passed.<br />
<br />
*Nail on the head*, Android.<!--content-->
 
Back
Top