I have a structure of div:
img {
width: 25px;
height: 25px;
}
<div id="container">
<span>Hello user</span>
<span>
<img src="https://en.opensuse.org/images/0/0b/Icon-user.png">
</span>
<span>Register</span> |
<span>Login</span>
</div>
What I need is: If the length of user increases, the div container should expand its width towards the left (the right direction remains fixed) to accommodate the content.
Note: This adjustment is not achieved through animation or transition, as user refers to an account.