Two box models in web pages (W3C box model, IE box model)

Two box models in web pages (W3C box model, IE box model)
There are two types of web page box models:

1: Standard W3C box model; 2: IE box model (the default model of IE browser).

In two different model web pages, the display effects of elements with the same CSS properties defined are different. The following formula is used to distinguish these two different box models.

1: Standard W3C box model

Width = width + (padding-left) + (padding-right) + (margin-left) + (margin-right) + (border-left) + (border-right)
Height = height + (padding-top) + (padding-bottom) + (margin-top) + (margin-bottom) + (border-top) + (border-bottom)

2: IE box model

width = width + (border-left) + (border-right)
Height = height + (border-top) + (border-bottom)

This model is the default box model of IE browser, of course, it can also be changed

<<:  Detailed explanation of the basic usage of the img image tag in HTML/XHTML

>>:  Summary of fragmented knowledge of Docker management

Recommend

CentOS 7.6 installation of MySQL 5.7 GA version tutorial diagram

Table of contents Environment Preparation Environ...

A detailed introduction to the Linux directory structure

When you first start learning Linux, you first ne...

What you need to know about responsive design

Responsive design is to perform corresponding ope...

React implements paging effect

This article shares the specific code for React t...

Calendar effect based on jQuery

This article example shares the specific code of ...

Vue implementation counter case

This article example shares the specific code of ...

A brief talk about cloning JavaScript

Table of contents 1. Shallow cloning 2. Deep clon...

Summary of MySQL's commonly used database and table sharding solutions

Table of contents 1. Database bottleneck 2. Sub-l...

HTTP Status Codes

This status code provides information about the s...

React+axios implements github search user function (sample code)

load Request Success Request failed Click cmd and...

In-depth understanding of Linux load balancing LVS

Table of contents 1. LVS load balancing 2. Basic ...

Detailed tutorial on how to install mysql8.0 using Linux yum command

1. Do a good job of cleaning before installation ...

Linux uses stty to display and modify terminal line settings

Sttty is a common command for changing and printi...

Solve the problem of using swiper plug-in in vue

Since I used this plugin when writing a demo and ...