如何链接整个表格单元格? [英] How can I link entire table cell?

查看:129
本文介绍了如何链接整个表格单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道是否可以将表格单元格的完整区域设置为onmousover或悬停?

换句话说,我想要链接,不仅是单元格内的文本,而且是整个单元格以及其中的文本,对于bla.html:


< table> ;

< tr>< td> < br>< br>< a href =" bla.html"> bla< / a>< br>< br> < / td>< / tr>

< / table>


如何在纯HTML / CSS或/和帮助下完成Javascript?


与最合适的CSS方式相比,最向后兼容的方式是什么?


非常感谢任何提示!


迈克尔


Naeser的定律:

你可以让它变得万无一失,但你可以''使它成为

该死的。

Anyone knows if it is possible to make the complete area of a table cell a
link onmousover or by hover?
In other words, I''d like to link, not only the text within the cell, but
the entire cell as well as the text within, to bla.html:

<table>
<tr><td> <br><br><a href="bla.html">bla</a><br><br> </td></tr>
</table>

How could this be done in pure HTML/CSS or/and with help of Javascript?

And what''s the most backward compatible way vs. the proper CSS way?

Many thanks for any tips!

michael

Naeser''s Law:
You can make it foolproof, but you can''t make it
damnfoolproof.

推荐答案

michael skrev:
michael skrev:
任何人都知道是否可以将表格单元格的完整区域设置为onmousover或悬停?
换句话说,我想链接,而不仅仅是内容中的文本对于整个单元格以及整个单元格以及bla.html:
Anyone knows if it is possible to make the complete area of a table cell a
link onmousover or by hover?
In other words, I''d like to link, not only the text within the cell, but
the entire cell as well as the text within, to bla.html:




a.link {display:block;宽度:100%}

-

Knud



a.link {display: block; width: 100%}
--
Knud


> a.link {display:block;宽度:100%}


感谢您的提示!但是你可以把它作为一个基于

的功能性例子如下:


< table>

< tr>< ; TD> < br>< br>< a href =" bla.html"> bla< / a>< br>< br> < / td>< / tr>

< / table>


再次感谢!

michael


昨天交付,代码今天,明天想。

> a.link {display: block; width: 100%}

Thanks for the tip! Could you however make it a functional example based on
the below:

<table>
<tr><td> <br><br><a href="bla.html">bla</a><br><br> </td></tr>
</table>

Thanks again!
michael

"Deliver yesterday, code today, think tomorrow."


2004年9月9日星期四19:21 :55 + 0200,michael< no **** @ example.com>写道:
On Thu, 9 Sep 2004 19:21:55 +0200, michael <no****@example.com> wrote:
a.link {display:block;宽度:100%}
a.link {display: block; width: 100%}



是谁写的?请属性。


我会独自而不是伪类。我保留.link。访问

..hover和.active用于在这些状态存在时我想要更改的内容

谢谢小费!但是你可以把它作为一个基于
的功能性实例,如下所示:

< table>
< tr>< td> < br>< br>< a href =" bla.html"> bla< / a>< br>< br> < / td>< / tr>
< / table>


Who wrote this? Please attribute.

I''d style a alone rather than the pseudoclass. I reserve .link .visited
..hover and .active for things which I want to change when these states
exist.
Thanks for the tip! Could you however make it a functional example based
on
the below:

<table>
<tr><td> <br><br><a href="bla.html">bla</a><br><br> </td></tr>
</table>




不要使用< br>非常。只有当你需要打破一条线

在中间

这样的时候。


a {display:block;宽度:100%;保证金:2em auto;}


< table>

< tr>< td>< a href =" bla.html"> ; bla< / a>< / td>< / tr>

< / table>



Don''t use <br> so much. Only when you need to break a line
in the middle
like this.

a {display: block; width: 100%; margin: 2em auto;}

<table>
<tr><td><a href="bla.html">bla</a></td></tr>
</table>


这篇关于如何链接整个表格单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆