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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -