I have written a small piece of code to display a text box and submit button next to it.

The submit button is displayed properly in all browsers except in safari the position of the search box is shifted to left. Is there any way I can fix it?


This can be solved by javascript as follow:

first you need to set a style specific for safari , just ignore the rest of browsers (as long as your code looks pretty in them) and design only for safari
then you need to include a bit of javascript code that will check for the browser used by the client and set a specific style for it

below is the script you will used

<script type="text/javascript">
var e = navigator.appVersion;
if (e.indexOf('AppleWebKit') > -1){
// Execute Specific Style for Safari Here


let me know if you need further assistance

use <table> to position input and button

       <td style="text-align: left;"><input type='text'></input></tb>
       <td style="text-align: right;"><input type='submit'></input></tb>