Move CSS ::after element into element

Hello everyone I was wondering how I get the ::after element from my <input> search field into the input field itself (

I’ve tried some things but at the end my result was to set the CSS style for the ::after element to margin-left: -25px;.

I am not sure if this is the best solution, especially because I am using a negative value for margin. Is there any better solution for this? Or is this the only way?

You can set it using position

.parentElement {
    position: relative;

.childElement {
    position: absolute;
    top: 5px;
    right: -25px;