Home

Search IconIcon to open search

inline and block elements in CSS

inline elements are placed “like text”, in a reading direction (left to right by default). Their width and height are determined by their content and cannot be set. Same for background. To solve this, use inline-block.

block elements occupy all the width given to them. By default they are placed from top to bottom.