Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - CSS/Javascript??? plz help ..
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedCSS/Javascript??? plz help ..

 Post Reply Post Reply
Author
sonya View Drop Down
Groupie
Groupie


Joined: 10 March 2006
Location: India
Status: Offline
Points: 81
Direct Link To This Post Topic: CSS/Javascript??? plz help ..
    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

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...
 
 
 
Back to Top
sonya View Drop Down
Groupie
Groupie


Joined: 10 March 2006
Location: India
Status: Offline
Points: 81
Direct Link To This Post Posted: 14 July 2006 at 3:01pm

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

I never had this... where is my image...??
 
Back to Top
aks427 View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 06 December 2003
Location: United States
Status: Offline
Points: 276
Direct Link To This Post 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.
Back to Top
sonya View Drop Down
Groupie
Groupie


Joined: 10 March 2006
Location: India
Status: Offline
Points: 81
Direct Link To This Post 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..
 
Back to Top
aks427 View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 06 December 2003
Location: United States
Status: Offline
Points: 276
Direct Link To This Post 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>
Back to Top
sonya View Drop Down
Groupie
Groupie


Joined: 10 March 2006
Location: India
Status: Offline
Points: 81
Direct Link To This Post Posted: 14 July 2006 at 9:45pm
hey.. I got it..
 
now I can finally sleep...
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.