I have an issue with the positioning of a textbox and button, where it doesn't display correctly under Chrome.
Here is an example from each browser, as you can see the textbox under Chrome is pushed out of position.
Internet Explorer/Firefox
Chrome
html:
<div id="divSearch">
<input type="text" id="txtSearch" placeholder=" Search..."/>
<input type="submit" id="btnSearch" value=""/>
</div>`
css:
input[type=text]{
width: 200px;
height: 24px;
border: none;
border-radius: 3px 0px 0px 3px;
-webkit-border-radius: 3px 0px 0px 3px;
-webkit-appearance: none;
-moz-appearance: none;
padding: 0;
}
input[type="submit"]{
border: none;
border-radius: 0px 3px 3px 0px;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-border-radius: 0px 3px 3px 0px;
width: 32px;
height: 24px;
background: url(../img/search_button.png) no-repeat;
background-color: white;
background-position: 10px 5px;
}
#divSearch{
float: right;
width: 300px;
height: 40px;
white-space: nowrap;
margin-right: 50px;
}
Now if I remove the height from input[type="submit"]
the positioning is fine except the button is now the wrong size.
I can't work out why the height of the button causes the issue. Any advice on how to fix it?
Thanks