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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -