私はページ機能で次のHTMLを持っています:
<div id="feature-detail">
<div class="da1 d-active">
Detail 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Show how
</div>
</div>
私はさらにページをさらに下に持っています:
<div id="page-submain" class="centred">
<div id="left-widget" class="widget">
Title
Lorem ipsum dolor sit amet.
Read More
</div>
</div>
NOTE: Neither of the above parent <div>
elements are nested within each other. Both have a parent of <body>
.
When I run some tests on the CSS structure, I have noticed that this style rule:
.widget p,a,h2 {
margin:3px 5px 3px 5px;
padding:0;
}
Is influencing the
in #feature-detail
. Why is this doing that when I've explicitly applied the style to the class 'widget'?
Not making a huge amount of sense to me at the moment, but it seems that IE, FF, Chrome and Opera are interpretting it exactly the same. Am I missing something here?
Thanks for taking a look!