Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   Programming General (http://siteownersforums.com/forumdisplay.php?f=44)
-   -   Explain CSS Box Model? (http://siteownersforums.com/showthread.php?t=146053)

Bates John 09-28-2014 10:43 PM

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.

softech 10-09-2014 11:20 PM

CSS box model is a rectangular space around a HTML element which defines border, padding and margin.

jyothireddy 10-19-2014 03:18 AM

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.