/    Sign up×
Community /Pin to ProfileBookmark

table cell color change on mouseover and mouseout

Hi All,

I am trying to do something similar to [url]http://www.kings-mall.co.uk/index.php?id=5[/url]

but mine will be in plain html with css and small amount of javascript.

I am not sure from where to start.Can you please give me an idea how to do mouseover in multiple td when mouseover in single one.

Many thanks,
Raj

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@raj_2006authorJul 07.2010 — I checked.Thanks.

But its not what I am looking for.

Something like this

[code=html]<TABLE BORDER="2" CELLPADDING="2" WIDTH="100%">
<TR onMouseover="this.bgColor='#EEEEEE'"onMouseout="this.bgColor=''">
<TD width="29%">Cat1</TD>
<TD width="40%">Cat2</TD>
<TD width="31%">Cat 3 </TD>
</TR>
<TR onMouseover="this.bgColor='#EEEEEE'"onMouseout="this.bgColor='#FFFFFF'">
<TD>1</TD>
<TD>2</TD>
<TD>3</TD>
</TR>
<TR onMouseover="this.bgColor='#EEEEEE'"onMouseout="this.bgColor='#FFFFFF'">
<TD>4</TD>
<TD>5</TD>
<TD>6</TD>
</TR>
<TR onMouseover="this.bgColor='#EEEEEE'"onMouseout="this.bgColor='#FFFFFF'">
<TD>7</TD>
<TD>8</TD>
<TD>9</TD>
</TR>
<TR onMouseover="this.bgColor='#EEEEEE'"onMouseout="this.bgColor='#FFFFFF'">
<TD>10</TD>
<TD>11</TD>
<TD>12</TD>
</TR>
</TABLE>[/code]


When I will mouseover "cat 1" cell the bg color of cell 2 5 8 will be changed....is it possible using nested css?
Copy linkTweet thisAlerts:
@KDLAJul 07.2010 — I suggest a stylesheet switcher that is activated via mouseover. That way, you can apply classes to the <td>.
Copy linkTweet thisAlerts:
@raj_2006authorJul 07.2010 — Yes exactly.....is there any resource or any example to start with...
Copy linkTweet thisAlerts:
@KDLAJul 07.2010 — This is a start: http://www.cssnewbie.com/simple-jquery-stylesheet-switcher/

The click function would be a hover function, in your case.
×

Success!

Help @raj_2006 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...