Can someone explain the difference between 'block' and 'inline-block' for the CSS display setting?
Basically, it’s a way to make elements inline, but preserving their block capabilities such as setting width and height, top and bottom margins and paddings etc. For example:
(Source: http://www.impressivewebs.com/inline-block/)
inline-block treats the element like other inline elements but allows the use of block properties.
Elements with display: block take up as much width as they are allowed and typically start on a new line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With