I have a external css for reset that apply to all table, td, div, etc.. In my website, there is a customer template that allow user to create their desire content in html.
When view this customer template in webpage, I don't want to apply above external css.
So I put this customer template content into a div, and trying to exclude this div and all childs of it from css.
Is it possible to write css selector to select all table, td, div, etc... which are not child of given div id?
Below is my testing html code and reset.css
The content of div customtemplate is dynamic enter by user.
User try border=1 to table, it apply all table cell to border 1 without reset.css.
But with reset css, there is no border appears.
My users are not html/css professional, so they will create simple html and expect to display as they write in their test page.
If their html not appear exactly the same for all browsers, it is up to them.
I have no responsible for it. I just need to display their html in div without reset.css.
Anyway to solve ?
<html>
<head>
<link href="reset.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<div class="customtemplate">
<table border="1" cellpadding="10px">
<tr>
<td>abcd</td><td>def</td>
</tr>
<tr>
<td>hello</td><td>world</td>
</tr>
</table>
</div>
<br><br>
<table>
<tr>
<td>default</td><td>reset</td>
</tr>
<tr>
<td>style</td><td>using</td>
</tr>
</table>
</body>
</html>
table, td {
border: 0;
padding: 0;
}