html - CSS conflict issues -
i have 2 separate files of css each styles part of page. specific 1 made master content ( header, footer, etc)and other main content might dynamic. linked 2 css files page, appears style of " main content " riding on style of " master content". how solve problem ? or how restrict second css files target styling of html part can define ? tried !important css property.
i linked 2 css files page, appears style of " main content " riding on style of " master content".
that's because established styles when loaded master content stylesheet, , loaded main content stylesheet... overwrote of styles you'd declared.
this cascade. what supposed happen.
e.g.
if have in master content stylesheet:
header h1 { color: blue; }
and then, afterwards, in main content stylesheet have:
h1 { color: red; }
your <h1>
(in <header>
) red
.
added:
you massive favour acquainting dom inspector(s) browser(s).
my preference firefox , firebug, others prefer chrome , chrome devtools etc.
a dom inspector able show styles being applied element , order in being applied...
... can see styles being overwritten other (later) styles.
Comments
Post a Comment