How can I disable a css file for some <div>
? I use MaterializeCSS framework and I have a specific area on my site where I want to use default browser styles.
Asked
Active
Viewed 55 times
0

Jan Kowalski
- 205
- 2
- 7
- 14
-
Possible duplicate of [Disable a css for part of the content](http://stackoverflow.com/questions/11793568/disable-a-css-for-part-of-the-content) – diiN__________ Oct 03 '16 at 09:57
-
It is too much styles to override – Jan Kowalski Oct 03 '16 at 10:00
-
See this http://stackoverflow.com/questions/15901030/reset-remove-css-styles-for-element-only – Chris Oct 03 '16 at 10:07
1 Answers
1
Full cross-browser?
If not, give that div a custom class, and then reset children nodes with all property
.
Something like:
p {
color: red
}
.no-style > * {
all: unset;
}
<div class="some-class">
<p>custom style</p>
</div>
<div class="no-style">
<p>default style</p>
</div>
<p>custom style</p>

gmo
- 8,860
- 3
- 40
- 51