<div class="container"><!-- Text input --><input type="text" class="container__input" /><!-- Search icon sticks to the left or right -->...</div>
.container {display: flex;/* If you want to place the icon before the text input */flex-direction: row-reverse;/* Border */border: 1px solid rgba(0, 0, 0, 0.3);}.container__input {border-color: transparent;/* Take available width */flex: 1;}