How many type of “Box Model” CSS have?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
CSS3 has two box-models.
content-boxandborder-box.content-boxis the default.content-boxcontent-boxis the default CSS box-model since CSS version 1. When usingcontent-box, only the content of the box is taken in effect when calculating the width of the box. In the reference below,content-boxis referred to as the W3C box model.border-boxborder-boxis the ported version of the Microsoft box model. In Internet Explorer 5 and below (IE6 in Quirks mode), IE considered the width of the element as being the combined width of the border, padding and content area of the box. In the reference below,border-boxis referred to as the W3C box model.No element uses the
border-boxbox model unless specified via thebox-sizingproperty, as such:Reference Image