...

View Full Version : trying to make standalone script to apply border: black 1px solid to selected cells



canadianjameson
01-23-2006, 11:24 PM
I often work with tables that I want to have borders. The problem becomes avoiding getting that irritating double-border effect when you simply use

td {
border: 1px solid black; }

What i'm looking for is a script that can apply the border property selectively to the proper cells to avoid the double-border effect seen here: www.enviromark.ca/fvjones/doublborder.htm

I was wondering how I could avoid this and I figured that if I had a drop-in border setting script then i'd never have to worry about it again.

I once had a person help me with a huge project here and they managed it... but i cant seem to extract the code. maybe that would be easier. you can find it here: www.enviromark.ca/timetable/simplifiedTable.htm

arnyinc
01-23-2006, 11:30 PM
It should be the border-collapse on the table.

table { border-collapse: collapse; }
td { border: 1px solid #000000; }

rlemon
01-23-2006, 11:31 PM
edit..

canadianjameson
01-24-2006, 12:27 AM
i tried that but i still got the double border:



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<style type="text/css">
table { border-collapse: collapse; }
td { border: 1px solid #000000; }
</style>
<body>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>

arnyinc
01-24-2006, 05:17 AM
Strange. I tried your code in FireFox and IE6 and it's showing the thin border for me :confused:

Hopefully someone else can help. I'm stuck.

canadianjameson
01-24-2006, 06:02 AM
thats weird, now it works.

hmm says i.
thx all



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum