Table with black outer, but grey inner border
I want to create a html table with a 1pt black outer border and the same border around 开发者_运维技巧every td.
Should look like this (only the borders, of course)
I use
<table border="1" style="border-collapse:collapse; border-color:Black; border-style:solid; border-width:1pt">
As a result I get a black outer, but grey inner borders.
You could try implement something like this in your CSS stylesheet.
.mytable
{
border-collapse:collapse;
border-color:#000000;
border-style:solid;
border-width:2px;
}
.mytable td
{
border-color:#cccccc; /*grey*/
border-style:solid;
border-width:1px;
}
And something like this HTML:
<table class="mytable">
<tr>
<td>Content</td>
</tr>
</table>
Example here
精彩评论