One of my components is designed to act as a badge. The CSS for this component includes:
https://i.sstatic.net/F0QZ6.png
HTML:
<div class="label label-as-badge">
{{ value.Termo }}
<i class="fa fa-times"></i>
</div>
CSS:
.label-as-badge {
cursor: pointer;
margin-left: 5px;
border-radius: 50px;
font-size: 12px;
padding: 10px;
background: #0066ba;
}
I am trying to place these badges in a flex div, with vertical spacing in between them. However, due to the padding, they end up looking too close together.
https://i.sstatic.net/6rO1q.png
Can anyone suggest how I can achieve the right vertical spacing between these items?
This is my div's HTML:
<div class="badges">
<app-badges
*ngFor="let badge of badges"
[value]=badge>
</app-badges>
</div>
CSS:
.badges {
display: flex;
flex-wrap: wrap;
}
I have already attempted using the margin-bottom property but it did not produce the desired result.