【发布时间】:2014-06-02 01:46:13
【问题描述】:
我是一名初级网络开发人员,正在学习如何创建表格。我需要一个表格,表格周围有边框,每一行都有边框(有 6 行)。该表需要如下所示:
这是我现在的代码:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
<!--
table, tr, td {border: 1px solid;
padding: 4px;
border-color: 628ECC;
}
tr {border: 1 px solid;
border-color:628ECC;
}
-->
</style>
<meta charset="utf-8" />
<title>RMHCTable</title>
</head>
<body>
<header>
<nav>
</nav>
</header>
<section>
<aside>
</aside>
<article>
<h1 style=font-family:"Futura">Gift Options and Benefits</h1>
<table>
<tr class="first row">
<td>Type of Gift</td>
<td>Income to Donor</td>
<td>Taxation of Income</td>
<td>Benefits to Donor</td>
<td>Value to the St. Louis<br>Ronald McDonald House</td>
</tr>
<tr>
<td>1. Cash or Security</td>
<td>None</td>
<td>None</td>
<td>Tax deduction on the current market<br> value. Avoidance of capital gains tax<br>
on appreciated security.</td>
<td>Immediate receipt of cash<br> or security gift.</td>
</tr>
<tr>
<td>2. Bequest in Will</td>
<td>N/A</td>
<td>N/A</td>
<td>Desired estate distribution.<br> Reduced estate taxes.</td>
<td>Receipt of bequest at death<br>of donor.</td>
</tr>
<tr>
<td>3. Charitable Gift Annuity</td>
<td>Fixed amount based on<br>actuarial tables.</td>
<td>Portion of income<br> is non-taxable.</td>
<td>Substantial tax deduction in year of<br>gift. Reduced capital gains tax.</td>
<td>Property contributed;<br>activated as financial<br>benefit at death</td>
</tr>
<tr>
<td>4. Charitable<br>Remainder Trust<br>Annuity or Unitrust</td>
<td>Fixed income or variable income based on annual value of Trust</td>
<td>Income taxable<br>based on annual<br>income.</td>
<td>Initial income tax deduction based<br>on the market value of the gift,<br>
reduced by factors from the IRS<br>
which determine value of the life estate.<br>No capital gains tax.</td>
<td>Receipt of charitable<br>remainder at death.</td>
</tr>
<tr>
<td>5. Life Insurance<br>Policy</td>
<td>None</td>
<td>None</td>
<td>Tax decuctions on premiums paid,<br>dividend assigned, cash or replacement<br>
value. Avoidance of probate, estate/<br>inheritance taxes.</td>
<td>Receiipt of donor financial<br>benefits at death or<br>liquidation of policy.</td>
</tr>
<tr>
<td>6. Gift of Persoanl<br>Residence</td>
<td>N/A</td>
<td>N/A</td>
<td>Immediate tax decution for value<br>of remainder</td>
<td>Ownership of farm or<br>residence at death of<br>life tenants.</td>
</tr>
</table>
</article>
</section>
<footer>
</footer>
</body>
</html>
我一直无法理解一般的样式表。我了解内联样式,但在使用 CSS 时遇到了麻烦。
【问题讨论】:
-
你能发布你有什么CSS代码吗?也许创建一个 JSfiddle 并在您的问题中发布链接。
-
我认为你必须检查 colspan 和 rowspan 属性。 aprende-web.net/html/html6_3.php
标签: html css html-table border