Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you disable all styles on an element ? Any property to set all attributes of an element to none all in one go?

Tags:

css

I am embedding telerik's radEditor in my page..its inheriting css properties from the master page..like H2 is in blue color..its got background color...

what should I type in my custom css class (the one exclusively made for radEditor) so it over rides ALL the Master page's css properties and applies nothing to heading tags??

I wrote this:-

h2{color:black;background-image:none;}

still h2 tag doesn't appear smaller that H1 tag in the drop down list in my radEditor..it still is applying css from master page..do I need to search for ALL the attributes being applied in master page and set them to none one by one in my custom css file ?/

like image 434
Serenity Avatar asked Dec 10 '22 13:12

Serenity


1 Answers

AFAIK, there's no such possibility in CSS. You have two options:

1: Select your H2 elements as specifically as possible and then apply your css to remove the styling. Pseudo code, as I do not know the structure of your HTML:

#master_page #page h2{font-style:none; etc...}

2: Use JavaScript to dynamically remove all formatting of a selected element. This solution however implies you could not restyle the element at all, so I guess it's not what you're looking for. just to be complete :)

like image 166
thomaux Avatar answered Dec 15 '22 00:12

thomaux