I am working with a layout that aligns elements to the right
HTML
<div class="flex-row">
<div class="flex-1">
<button class="el-button el-button--primary">Add File</button>
<ul class="el-upload">
<li classs="el-upload">something wider than the button</li>
</ul>
</div>
</div>
CSS
.flex-row {
display: flex;
align-items: baseline;
.flex-1 {
flex: 1 1 auto;
}
}
However, I am facing an issue where when the content of the list is wider than the button, it appears misaligned like this:
-------
| X |
-------
-----------------
| |
-----------------
Is there a way to ensure that the alignment stays to the right regardless of the width of the element below? Like so:
-------
| X |
-------
-----------------
| |
-----------------