I've a class named entry
that contains different parts of post article of my web site. Something like below:
<div class="entry">
<div id="author-box-single">
<div class="author-box">
<div class="at-img">
</div>
</div>
</div>
<h1></h1>
<p></p>
<h2></h2>
</div> <!-- End of entry -->
As you see it contains many div
s and headlines and etc. How can I assign one property, for example padding-right: 10px
to all child
s of entry
?
*
sign means everything. >
means direct children. For example:
.entry > * {
padding-right: 10px;
}
will assign property to every direct child.
.entry * {
padding-right: 10px;
}
will assign property to everything inside it.
You can use div instead of *
.entry > div {
padding-right: 10px;
}
will assign to all direct <div>
children.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With