I have a header where on the left side there is header name and on the right side, there are a few buttons.
And the problem is, header name splits into two lines at last white space.
I have below code and it's happening because of .right
class's width set to inherit.
pls refer the code.
Is there any way for not letting the text to split?
.parent {
width: 100%;
height: auto;
display: flex;
padding: 0.5rem 1rem;
}
.right {
text-align: right;
width: inherit;
}
<div class="parent">
<!---->
<h6>A B C D E</h6>
<div class="right">
buttons
</div>
</div>