I'm writting a badge-ish block.
The problem is with the 3rd block (1 (Something something)
), as you can see in the snippet, it overflows to the next line and leaves extra space on the right.
What should I do to get rid of that space?
It would be tremendously great if it's pure CSS and doesn't involve jQuery.
Thanks!
section {
width: 8rem;
}
div {
margin-top: 1rem;
}
.outer {
background: blue;
display: inline-flex;
color: white;
font-family: Helvetica, Arial, sans-serif;
align-items: center;
justify-content: center;
min-height: 32px;
min-width: 32px;
}
<section>
<div class="outer">
1
</div>
<div class="outer">
Very very very long Textttttt
</div>
<div class="outer">
1 (Something something)
</div>
<div class="outer">
Test
</div>
</section>