html - How to prevent child element from inheriting CSS styles -


i have <div> element <p> element inside:

<div style="font-size:10pt; color:red;">     parent div.     <p>this child paragraph.</p>     parent div ends here. </div> 

how can prevent paragraph inheriting css properties set <div>?

in case best way on right styles <p> element inheriting:

so in css file, should using instead of inline styles:

.parent-div {     font-size: 10pt;     color: red; }  .child-paragraph {     font-size: 12pt;     color: black; } 

Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -