Reputation:
I want a input field in my website design. When I coded like this as shown in below
HTML:
<input type="text" name="lemail" value= "" placeholder="Email" id = "lemail"/>
CSS:
*{
font-size:12px;
font-family: sans-serif,helvetica,arial;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-ms-box-sizing: border-box;
}
#lemail{
position: absolute;
top: 40px;
left: 20px;
padding-left: 20px;
padding-top: 8px;
padding-right: 20px;
padding-bottom: 8px;
border: 1px solid #007599;
border-radius: 3px;
}
captured photo results:
CHROME: chrome output here FIREFOX: firefox output here
here the problem is input box length is different in chrome and firefox. In firefox length is a larger than in chrome.Border-box did not work. how to make input field look same in both browser?
Upvotes: 1
Views: 83
Reputation: 51
define width to your box like as in below code width:250px;
#lemail{
position: absolute;
top: 40px;
left: 20px;
padding-left: 10px;
padding-top: 8px;
padding-right: 20px;
padding-bottom: 8px;
border: 1px solid #007599;
border-radius: 3px;
width:250px;
}
Upvotes: 1