一种方法是将它们放在一个right对齐的容器中.
HTML:
<div>
<input type='text'> </input>
<button> increase width </button>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
div {
text-align: right;
width: 450px;
}
Run Code Online (Sandbox Code Playgroud)