0

Hi,

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?

Thanks.

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Luckychap
0

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
}

</script>

let me know if you need further assistance

Edited by Amr87: n/a

0

use <table> to position input and button

<table>
   <tr>
       <td style="text-align: left;"><input type='text'></input></tb>
       <td style="text-align: right;"><input type='submit'></input></tb>
   </tr>
</table>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.