新来的 - 抱歉说;我是HTML新手。
我尝试在 Plone 中使用表格单元格作为链接。我想创造一个幻灯片'标签' (因为这在目前的CSS中不可用)并且不希望文本加下划线,但我也希望该单元的函数指向另一个页面。
我在网上尝试了一些似乎不起作用的建议,因为它使第一个单元格加下划线并且只链接了文本。 e.g:
<td><a href="http://example.com"> hello world </a></td>
我的表格行目前如下:
<table class="data">
<tbody>
<tr>
<th class="green" style="text-align: center; ">Tab A</th>
<th class="white" style="text-align: center; ">
<a class="internal-link" href="www.google.com"></a>Tab B</th>
<th class="white" style="text-align: center; ">Tab C</th>
<th class="white" style="text-align: center; ">Tab D</th>
</tr>
</tbody>
</table>
&#13;
我需要所有这些单元格链接到其他页面,即好像它们是链接的图像。
答案 0 :(得分:0)
试试这段代码。
table.data th > a {
display: block;
text-align: center;
text-decoration: none;
padding: 3px 5px;
}
<table class="data">
<tbody>
<tr>
<th class="green"><a href="http://example1.com">Tab A</a></th>
<th class="white"><a href="http://example2.com">Tab B</a></th>
<th class="white"><a href="http://example3.com">Tab C</a></th>
<th class="white"><a href="http://example3.com">Tab D</a></th>
</tr>
</tbody>
</table>