class - CSS classes, order of precedence -
i stumbled on css issue don't understand. have parent class styles on element, , class on element which, in opinion, should overwrite parent class, doesn't:
<div class="parent"> <p>regular paragraph</p> <p class="note">note paragraph</p> </div>
css
.parent p { font-size: 1.5em; } .note { font-size: 90%; }
i don't use ids instead of classes, , don't have important! anywhere in styles. understand can use "div" instead of "p" fix problem in case. try figure out why precedence works way.
specifying element along class give selector priority on parent definition. try setting p.note {
instead.
Comments
Post a Comment