Do you know any good article on \"When to use display:block when :inline and when :inline-block\" and why?
and when we will ha
The use cases for block and inline are pretty obvious. Use inline if you want to apply a style to a short span of text (e.g. a few words), and use block for rectangles areas with width/height.
As for inline-block, it's used naturally for images. It's useful when you want to have small blocks flowing left-to-right, top-to-bottom like regular text, but still have them like blocks.
Note: in 90% of cases you don't need to specify the display property, just use appropriate elements with classes, like  or  for inline,  for blocks. The main way it comes into play is when hiding stuff with Javascript, you just need to revert the element to its original/natural display attribute.