CSS Box Model

If we are talking about CSS layout then first thing is CSS box model which provides proper layout structuring and makes layout flexible. These are some properties which come under box model like margins, padding, borders and content that we need in layout to display users.

Margin –Margin will take space from outside, example: if we set 10px margin in div then next content will start after 10px.
Padding – Clears an area around the content. The padding is transparent
Border – A border that goes around the padding and content
Content –
Where text and photos will be appeared

The image below is example of box model:



Leave a Reply

Your email address will not be published. Required fields are marked *