1.1 KiB
1.1 KiB
Evenly distributed childs
Evenly distributed childs within the alignment container
HTML
<div class="evenly-distributed-childs">
<p class="child">Item1</p>
<p class="child">Item2</p>
<p class="child">Item3</p>
</div>
CSS
.evenly-distributed-childs {
display: flex;
width: 300px;
justify-content: space-between;
}
Demo
Item1
Item2
Item3
Explanation
display: flexenables flexbox.justify-content: space-betweenevenly distributes childs in the line.
First item will be on the start line, last item on the end line
Browser support
⚠️ Needs prefixes for full support.