CSS Box Model


css CSS Box Model Css Box Model

Box Model

Box model is the basic building block of web dessining. Through box model you can easily understand the concept of padding,margin,border and content of the element in css.

Content The part in which text,image,audio player and other contents lie. Padding Around contents the empty space is known as padding and padding is transparent Border Outside the padding and content border is present. Margin Outside the border the empty space is known as margin and margin is transparent. <style> .box { background-color: silver; width: 350px; border: 20px solid navy; padding: 20px; margin: 20px; } </style> <body> <h2>Box Model</h2> <div class="box"><b>Through this box you can easily understand the concept of border,padding ,margin and contents of the element</b> This text is content of this div.........This text is content of this div..........This text is content of this div.........This text is content of this div............This text is content of this div.........This text is content of this div....................This text is content of this div.........This text is content of this div </div> </body>
css Css Box Model Chapter Next »