...

View Full Version : Table CSS



Surf Boy
01-16-2004, 01:27 PM
Hi

I have a table which is one row and eight columns wide.

Is there any way using css to do this.

I would like to change the colour of each column on a mouse rollover?

Cheers

coothead
01-16-2004, 07:04 PM
Hi there Surf Boy,

Although not elegant, this is
one way to achieve your object....



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta content="mshtml 6.00.2800.1264" name="generator" />
<title>td changer</title>
<style type="text/css">
<!--
div{width:400px;position:absolute;left:50%;top:20%;center;margin-left:-200px;}
table{border:solid 1px #000000;}
td{width:50px;height:50px;border:solid 1px #000000;}
//-->
</style>
</head>
<body>
<div>
<table summary=""><tr>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'">&#160;</td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'">&#160;</td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'">&#160;</td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'">&#160;</td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'">&#160;</td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'">&#160;</td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'">&#160;</td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'">&#160;</td>
</tr></table>
</div>
</body>
</html>


c:D:Dthead



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum