...

View Full Version : table with 1px wide css borders



crazygamer
12-03-2005, 01:17 AM
I want to make a table where all of the borders (between every td) are 1px solid black. This may sound silly, but right now I'm putting a border on every td individually, and the problem with that is that IE renders both borders together creating a 2px border.

How do you do this?

Thanks!

_Aerospace_Eng_
12-03-2005, 01:25 AM
table {
border-collapse:collapse;
}

mark87
12-03-2005, 01:26 AM
Like this ?



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" />
<title></title>
<style type="text/css">

table {
border-collapse: collapse;
}

td {
border: 1px solid #000;
padding: 10px;
}

</style>
</head>

<body>

<table>
<tr>
<td>a</td> <td>b</td> <td>c</td>
</tr>
<tr>
<td>d</td> <td>e</td> <td>f</td>
</tr>
</table>

</body>

</html>

Edit, Aerospace beat me. :)

crazygamer
12-03-2005, 01:36 AM
Thanks, exactly what I needed.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum