Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making cell a link 1

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
US
what is the easiest way to make a cell act as a link meaning no matter where you click inside the cell it acts as a link....

[conehead]
 
Try this:

Code:
<html>
<head>
<style type="text/css">
td {
	margin: 0;
	padding: 0;
	width: 100px;
	line-height: 50px;
	border: 1px solid black;
	text-align: center;
}

td a {
	display: block;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
}
</style>
</head>

<body>
<table>
	<tr>
		<td><a href="#">Link</a></td>
		<td>Test</td>
	</tr>
</table>

</body>
</html>

--James
 
you could always use the ONCLICK event of the cell which would give you a client side event that you could handle using Javascript if you wanted to.
 
James,

Very slick - have a star!

Mike Krausnick
Dublin, California
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top