Print Page | Close Window

CSS/Javascript??? plz help ..

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=20680
Printed Date: 28 March 2026 at 5:59pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: CSS/Javascript??? plz help ..
Posted By: sonya
Subject: CSS/Javascript??? plz help ..
Date Posted: 14 July 2006 at 3:00pm

Hi friends,

Plz help me in this ...

Right now I m using one table which changes color on mouse actions...

For that I m using to types of codes.. I have defined one class in attached style sheet file.. like this..

td.menuTable { background-color: #60B8FE }

and remaining code is included in html code of the table in my webpage... like this.

<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#60B8FE" bordercolordark="#FFFFFF">
  <tr align="center" valign="middle">
    <td width="12%" height="30" class=menuTable onMouseOver="this.style.background='#99FF99'" onMouseOut="this.style.background ='#60B8FE'" onClick="this.style.background ='#FF0000'">&nbsp;</td>
    <td width="12%" height="30" class=menuTable onMouseOver="this.style.background='#99FF99'" onMouseOut="this.style.background ='#60B8FE'" onClick="this.style.background ='#FF0000'">&nbsp;</td>
    <td width="12%" height="30" class=menuTable onMouseOver="this.style.background='#99FF99'" onMouseOut="this.style.background ='#60B8FE'" onClick="this.style.background ='#FF0000'">&nbsp;</td>
  </tr>
</table>

It perfectly works for me.. but now I don't want it that way... I want to define all "style" attributes in my style sheet only instead of in html code.

So that in one class I can have all the results.. something like this...

<style>
<!--
.trbox
{
background-color:#FFFFC3;
onmouseover:"this.style.background":#FF00FF;
onMouseout:"this.style.background":#FFFFC3;
onClick:"this.style.background":#FFFFFF;
}
-->
</style>

But unfortunately.. I m not getting results the way I want with above code...

If anyone can understand this.. and can help me to achieve desired results.. then plz help me.

Actually I want something like shown in following link.... plz check

http://www.activewidgets.com/javascript.forum.6379.0/change-background-color-of-a.html - http://www.activewidgets.com/javascript.forum.6379.0/change-background-color-of-a.html

Thanks in advance  
 
One more thing.. is this the right forum for such query... Or else I should post this somewhere else.. to get required help.. plz tell me...
 
 
 



Replies:
Posted By: sonya
Date Posted: 14 July 2006 at 3:01pm

hey.. why i m getting this avtaar???

I never had this... where is my image...??
 


Posted By: aks427
Date Posted: 14 July 2006 at 4:21pm
onmouseover:"this.style.background":#FF00FF;
onMouseout:"this.style.background":#FFFFC3;
onClick:"this.style.background":#FFFFFF;
 
Those three can't be in the CSS as they are javascript.  You will have to put them back in the table.


Posted By: sonya
Date Posted: 14 July 2006 at 9:34pm
Hi aks427,
 
thanks for ur help..
 
Ya I got it anyway.. I have to keep it in table.. but will u plz help me understand that why following css code is not working for me..
 
<style>
<!--
td.normal { background-color:#FFFFCC;
border-right:#DA0008 2px solid;
border.top:#FD7D40 2px solid;
border.left:#FD7D40 2px solid;
border.bottom:#DA0008 2px solid;}
-->
</style>
 
I m using this class for td.. but it's not giving me desired effect.. only background-color works.. but not the borders.
 
Plz help guys..
 


Posted By: aks427
Date Posted: 14 July 2006 at 9:44pm
Should be
 
<style>
<!--
td.normal { background-color:#FFFFCC;
border-right:#DA0008 2px solid;
border-top:#FD7D40 2px solid;
border-left:#FD7D40 2px solid;
border-bottom:#DA0008 2px solid;}
-->
</style>


Posted By: sonya
Date Posted: 14 July 2006 at 9:45pm
hey.. I got it..
 
now I can finally sleep...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net