开发者

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)

Table with black outer, but grey inner border

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜