css - Difference between IE10 and Chrome calculating heights of inline-block elements -


i have modified bootstrap dropdown truncate text within button element, however, there seems difference in how height of button element calculated.

this fiddle demonstrates did initially key seems css controlling span element within button.

button.btn span {     min-width:91px;     max-width:91px;     overflow:hidden;     white-space:nowrap;     -ms-text-overflow: ellipsis;     -o-text-overflow: ellipsis;     text-overflow: ellipsis;     display:inline-block; } 

below browser metrics ie , chrome height of button element:

ie inline-block metrics chrome inline-block metrics

replacing inline-block style on span float: left as demonstrated in fiddle appears correct heights , works across both browsers.

button.btn span {     min-width:91px;     max-width:91px;     overflow:hidden;     white-space:nowrap;     -ms-text-overflow: ellipsis;     -o-text-overflow: ellipsis;     text-overflow: ellipsis;     float: left; } 

ie float: left metrics

what causing difference in element height between chrome , ie when using inline-block , doing correctly?

update: firefox appears same thing ie here.

i think you'll find answers @ url:

http://blog.mozilla.org/webdev/2009/02/20/cross-browser-inline-block/

note: did gave try display:table-cell?


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -