CSS Inline-block
The display: inline-block value is a mix of display: inline and display: block.
CSS Inline-block
The display: inline-block value is a mix of display: inline and display: block.
Compared to display: inline, the major difference is that display: inline-block allows to set a width and height on the element.
Compared to display: block, the major difference is that display: inline-block does not add a line-break after the element, so the element can sit next to other elements.
Example 1: inline vs inline-block vs block
display: inline
Hello Worlddisplay: inline-block
Hello Worlddisplay: block
Hello WorldExample 2: Using inline-block to Create Navigation Links
One common use for display: inline-block is to create navigation links horizontally instead of vertically.