css - inline-block to span tag behaves differently in IE and webkit-browsers -


display:inline-block span tag behaves differently in various browsers. in ie browsers works perfectly. in webkit-browers(chrome, safari, etc..), there little gap between span , child tag.
here sample code:

     <style>        span{          display:inline-block;          border:1px solid red;          padding:0px;          margin:0px;         }      </style>        <span>           <input type="text"/>        </span> 

output in different browers
ie
enter image description here
chrome , safari
enter image description here

see there gap between spand , input field...

you should use selector, because margin between span , input, not span, need target input element , not span element

span input {     margin:0px; } 

demo


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -