1
<div class="main">
<div class="content"></div>
<div class="content"></div>
<div class="content"></div>
<div class="content"></div>
<div class="content"></div>
</div>
I wanted to insert some properties in "content" class Ivs, but I wanted these properties to ignore the first child, like the margin for example. I would like everyone to have a distance of 20px from each other, but if I apply directly the class "content", the first child also spaces 20px from the top of the browser and I don’t want the fact to occur. Can someone help me?
A hint. If you want to apply a margin between the elements and you don’t want to apply this margin to the top, you can use the css property
margin-bottom
.– Victor Carnaval
But then the last child would also take the margin-bottom. And, depending on the case, sometimes that lower margin may not be necessary. But still thanks for the suggestion!
– Samuel Reis
Ai when you need to set more rules the ideal is to use the selectors @hugocsl mentioned :)
– Victor Carnaval