Here is my html and css below
.flex {
display: flex;
justify-content: space-between;
}
.my-btn {
width: 150px;
height: 50px;
background-color: #3f729b;
line-height: 50px;
text-align: center;
color: #FFFFFF;
cursor: pointer;
display: inline-block;
}
<div class="flex">
<span class="my-btn btn-back">back</span>
<span class="my-btn btn-download">download</span>
<span class="my-btn btn-next">next</span>
</div>
if all the .my-btn
are visible, everything is looking fine, but if I want to have only .btn-next
visible it is left aligned. How can I have it right aligned. I've tried to use
.btn-next {
align-self: flex-end;
}
but it's not working.
And ideas?