/    Sign up×
Community /Pin to ProfileBookmark

how to remove styles

in my page I have

<link href=”css/Fin.css” rel=”stylesheet” type=”text/css”>
………………..

// table,tr,td defined in Fin.css.

I want to clear those styles for my new <table>,<tr>,<td> ..is it possible ?

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@Gozzy82Feb 08.2010 — I think http://www.hunlock.com/blogs/Totally_Pwn_CSS_with_Javascript

and the method killCSSRule should help you.
Copy linkTweet thisAlerts:
@cofactorauthorFeb 08.2010 — I think http://www.hunlock.com/blogs/Totally_Pwn_CSS_with_Javascript

and the method killCSSRule should help you.[/QUOTE]


its not mentioned there how to use the kill function

Can you please post the usage of kill code . I want to kill tr,td,table styles.

is there any other solution ?
Copy linkTweet thisAlerts:
@aj_nscFeb 08.2010 — Your stylesheet uses tags as selectors like table, tr, and td - what you want to do is change those to more specific selectors like:

<i>
</i>table#mytable
table#mytable tr
table#mytable td


That way, those rules would only be applied to the table that has an id of mytable. Your second table will be unaffected by those styles.

If you need clarification, post your stylesheet code, or a link to it, and I'll be more specific.
Copy linkTweet thisAlerts:
@Gozzy82Feb 08.2010 — the method aj_nsc mentions works well and that method leaves your other tables unaffected like he says which is probally what you want.

The usage of killCSSRule is: killCSSRule('table'); (for a table duh)

http://www.webdevout.net/test?021

shows it in action ( http://www.webdevout.net/test?021&raw )
×

Success!

Help @cofactor 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 5.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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...