Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-16-2004, 12:27 PM   PM User | #1
Surf Boy
New to the CF scene

 
Join Date: Mar 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Surf Boy is an unknown quantity at this point
Table CSS

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
Surf Boy is offline   Reply With Quote
Old 01-16-2004, 06:04 PM   PM User | #2
coothead
Senior Coder

 
coothead's Avatar
 
Join Date: Jan 2004
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 1,555
Thanks: 0
Thanked 196 Times in 192 Posts
coothead will become famous soon enough
Hi there Surf Boy,

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

Code:
<!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'"> </td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'"> </td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'"> </td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'"> </td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'"> </td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'"> </td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'"> </td>
<td onmouseover="this.style.backgroundColor='#ff0000'"onmouseout="this.style.backgroundColor='#ffffff'"> </td>
</tr></table>
</div>
</body>
</html>
cthead
coothead is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:13 PM.


Advertisement
Log in to turn off these ads.