DEV Community

Discussion on: What's the difference between an inline and inline-block element in CSS?

Collapse
 
babib profile image
𝐁𝐚𝐛𝐢 ✨

Nice article!

The outer display value of inline essentially tells the item to behave as an inline item when it's interacting with its neighbors. The inner type, block, creates a Block Formatting Context and imposes block level rules on its children.

Thanks for this.



I noticed your code snippets have no color. You coulld add the code language to the back ticks to beautify the snippets

html code snippet

You coud also embed your codepen

codepen embed code

You could check more details here editor's guide