According to W3C, the recommended way to render input elements is by creating a container div with absolute positioning and setting the width of the input element to 100%.
<div class="container">
<input type="text"/>
</div>
<style type="text/css">
.container {
position:absolute;
left:10px;
right:20px;
}
.container input {
width: 100%;
}
</style>
You can view an example at http://jsfiddle.net/pjK8s/1/
To add padding to the input field, style the container to mimic the appearance of the input and make the input itself transparent.
<div class="container">
<input type="text"/>
</div>
<style type="text/css">
.container {
position:absolute;
left:10px;
right:20px;
padding: 1px 8px;
margin: 2px 0px;
-webkit-appearance: textfield;
}
.container input {
width: 100%;
border: 0px;
margin: 0px;
padding: 0px;
background: transparent;
outline: none;
}
</style>
Check out an example at http://jsfiddle.net/Vyj22/1/