i have one single class for margin and i am using this class to two different div but i want to margin 0 in second div, i dont want to change html because if i do that i will have work on many pages so i want to do that either jquery or css. i tried it to do that with child selector but it wont work for me.
<style>
.margn { margin-top:20px;}
</style>
<body>
<div class="margn">hii</div>
<div id="call" class="margn">bye</div>
</body>
you can use jQuery here as per your tag in the question
just right the below code. Remember you include jquery file.
EDIT :
Also if you want to use only CSS you can refer the answer by @sandeep below.
remember CSS works sepquentially so write your css in proper sequence.
in CSS