![]() |
Explain CSS Box Model?
CSS box model is a rectangular space around a HTML element which defines border, padding and margin.
Border: - This defines the maximum area in which the element will be contained. We can make the border visible, invisible, define height and width etc. Padding: - This defines the spacing between border and element. Margin: - This defines the spacing between border and any neighboring elements. |
CSS box model is a rectangular space around a HTML element which defines border, padding and margin.
|
All HTML elements can be considered as boxes. In CSS, the term "box model" is used when talking about design and layout. The CSS box model is essentially a box that wraps around HTML elements, and it consists of: margins, borders, padding, and the actual content. The box model allows us to add a border around elements, and to define space between elements.
There will be different parts of that like: Content - The content of the box, where text and images appear Padding - Clears an area around the content. The padding is transparent Border - A border that goes around the padding and content Margin - Clears an area outside the border. The margin is transparent |
All times are GMT -7. The time now is 08:15 AM. |
Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.