mtorbin Posted March 25, 2009 Share Posted March 25, 2009 Hey all, I don't know if this is possible but I want to know if there's a declaration that I can call to CANCEL a previously declared style. Consider the following: At some point in my page, I have something like this (fictional example): <style type="text/css">.myStyle{background-color:#ff0000; width:500px;}</style> Later on, I want to REMOVE the width declaration (not patch over it, I know how to do that) so that the only active declaration is the background-color. Is this possible? Thanks, - MT Quote Link to comment Share on other sites More sharing options...
jceresini Posted March 27, 2009 Share Posted March 27, 2009 You could create a second style with the same settings minus the width, such as <style type="text/css"> .myStyle{background-color:#ff0000; width:500px;} .myStyleExpanded{background-color:#ff0000;} </style> Then use javascript to update the objects style classname. Not sure if that will suffice for what you are trying to do,but its one approach Joe Ceresini Network Engineer jceresini@hostmysite.com HostMySite.com Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.