开发者

Is display: block and display:inline equivalent to display: inline-block?

开发者 https://www.devze.com 2023-04-05 20:39 出处:网络
I have an div I am viewing in Firebug: One section has: display: block; Elsewhere, there is: display: inline !important;

I have an div I am viewing in Firebug:

One section has:

display: block;

Elsewhere, there is:

display: inline !important;

I would have thought that the inline would have overriden the block, but neither attribute is crossed out by Firebug.

I have a text input inside t开发者_如何学Che div that can't be clicked in Firefox (works in Chrome). If I cross out either display value, then it works. So it seems both are applied.

So is display: block and display: inline combined into display:inline-block?


No, adding display: block; followed by display: inline; should not be equivalent to display: inline-block;. As you suggested, display: inline !important; should take precedence over display: block;. Is it possible that the inline-block value is being attributed to it elsewhere somehow? Perhaps it is a bug.

0

精彩评论

暂无评论...
验证码 换一张
取 消