April 23, 2012
Is there a way to take off the style off a certain table?
Question by user1250526
Hi guys I have a css file which styles my tables, although I have one table where I would like to use a different style, or no style? is there a way I can do something like and then it is plain and ignores the css?
I have looked but I can not find anything related!
Answer by mert
Use class definitions for table properties in your CSS file. Whenever you want them, use with class property.
CSS
table.myClass {
...
}
HTML
<table class="myClass">...</table>
<table class="anotherTableWithAnotherClass">...</table>
Answer by Starx
CSS are cascading style sheets, they only style an element. Can’t manipulate anything. You will need to use JavaScript.
Best way I know of, is to use CSS classes for different styles. And use javascript to switch them or remove them.