1

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 the 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?

2
  • You are correct, display: inline-block; joins the inline behavior with the css box model from display: block;. Commented Sep 20, 2011 at 4:14
  • Interestingly, I have a display: block elsewhere on the same element that is crossed out. So maybe there is a bug with Firebug Commented Sep 20, 2011 at 4:16

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

"Is it possible that the inline-block value is being attributed to it elsewhere somehow?" - What does that mean?
@Casebash - Like, in some other style you have display:inline-block; or perhaps in the default style for the element.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.