JSFiddle - React, Tailwind, and code Playground

HTML

<div class="parent">
    <input type="text" />
    <button>Go!</button>
</div>

CSS

body {
    padding: 10px;
}

.parent {
    position: relative;
    width: 400px;
    /* right margin = 20px + button width + padding between button & input */
    padding: 20px 70px 20px 20px;
    background-color: #ccc;
}

.parent input {
    width: 100%;
}

.parent button {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 30px;
}

JavaScript

$(document).ready(function(){
    $('.parent').css('background','red');
});