Why does W3C need to develop the content-box model? The IE box model before IE5.5 is also excellent today-

Source: Internet
Author: User
In addition, the box-sizing new in CSS3 can modify the box model. Isn't it a face-hitting behavior for W3C errors? In addition, the box-sizing new in CSS3 can modify the box model. Isn't it a face-hitting behavior for W3C errors? Reply content: laxatives ......

Who knows about the past.

============ The following are all guesses ============

Let's talk about the two different things. We can only look at the relevant time. GuessThought:
  • One of the founders of Hakon Wium Lie CSS proposed the concept of CSS in 1994.
  • IE 3.0 was released on September 1, August 13, 1996. It began to support CSS (partially ).
  • The earliest draft of CSS 1 found on W3C, Cascading Style Sheets, level 1It was on December 1, December 17, 1996.
  • IE 4.0 released in September to October 1997
According to the above speculation, IE 3.0, which initially (partially) supports CSS, was under development (at least earlier than August 1996) and W3C has no (finalized) specification to be referenced. The IE box model is implemented according to your own understanding.

Later, the earliest CSS 1 specification emerged, which is estimated to be in the early stage of IE 4.0 development.

However, in the first week of IE 3.0 release, the number of downloads exceeded 1 million. A large number of users may leave Microsoft concerned about the compatibility issues in the future, and the box model is different. Or the W3C under the huge market share comparison is no longer important, so that Microsoft at that time ignored the differences in the box model.

It is even more unknown why W3C needs such a box model.
You also have to guess.


Perhaps this is a design concept:
  • The premise is that content-width border padding cannot be negative, otherwise it cannot be drawn. Can you imagine a negative border display? Or not.
  • In the border-box model, if the total width of border padding is greater than width, what is the actual content-width?
    • Direct 0? The width is wider than the set value. Isn't the old IE's content too wide.
    • Negative value? It is too unreasonable to set content width to negative. How can this problem be drawn?
  • In the concept of the content-box model, content-width border padding is a positive value, and the content-width value in border-box is obtained by subtraction. All values can be positive values through addition. Layout computing is much simpler, and there are few pitfalls to achieve it.
However, such a model is against the normal idea.
W3C is probably introducing box-sizing to be compatible with the preceding solutions based on the experience of the IE border-box model.

=

See the layout and layout.
What is the difference between these two things? No one has ever said that.

Supplement my understanding:

Version, slice back, slice for small boards, is two opposite small boards
After printing, the version is two opposite words, one side is the mold side is the result of printing.
The so-called layout means to arrange these texts. (Text is the most basic unit in printing)

Bureau, lower ruler, ruler is a rule, mouth is a word can be extended to macro.
Rules are the macro content restricted by rules.
The layout is to set some macro constraints.

Therefore, the layout is to adjust the macro structure, and the layout is the individual location of the layout.

Although the box model does not conform to the normal thinking, for the initial CSS specification, considering that the individual layout of the details is consistent with the standard and changed to the normal thinking. It is not surprising that such a box model is set. First, the subjective word "disgusting" should not be used casually. It may be because of being pregnant. The box model does not know whether it is the former or the latter.


Seriously, the standard box model is like this. After the css conf conference in January this year, I also asked Bert Bos (and Hakon Wium Lie jointly invented CSS ), although his answer is not completely satisfactory (not to mention it here), the basic reasons are as follows:

As we have always said, CSS was designed mainly for text layout requirements, rather than for GUI layout.


Why does IE anticipate GUI layout requirements? I overestimated the IE team. They just implemented it in this way. (Pseudo) History of famous face-hitting events: box-sizing: border-box;
Who uses it and who likes it. In fact, I have never understood it. W3C draws a few diagrams and a bunch of inexplicable texts equivalent to the level of primary school students, while IE is a box model that conforms to human understanding, some people think that the former is orthodox, while the latter is an evil.



Let alone I am black it. The source of this image is:
Http://www.w3.org/TR/WD-CSS2-971104/images/boxdim.gif


Finally, let's answer the question. You can only guess this.

W3C believes that the CSS box model is used to control TypographicalSo the specified width and height are the width and height of the content. IE thinks that the CSS box model is used to control Layout, So And table width and height DefinitionsSame.

As a matter of fact, I have always thought that it would be awkward to use the box model for layout. Table is the most suitable layout, although it has some side effects and troubles. Of course, the latest Flexible Box is an artifact. If we all use Flexible Box, we won't be able to place li horizontally and vertically center the magic horse.


The W3C specification is more reasonable if we look at the original design purpose of the Box Model (defining the size and margin of block elements). After all, when we set the image width and height, is it considering the height and width of the image border? We do not consider padding when setting the paragraph width. The problem is that when the box model is used for layout, it is obviously not as reasonable as the IE specification. So the question is, why do we have to use the box model for layout? In fact, W3C standards were initially used to blacklist Microsoft. I feel that Microsoft's box is a designer's thinking. w3c started to contact the Web with engineer's thinking for 10 years. At that time, all the materials I saw were about w3c models, and I hate ie very much all the time ,:-), isn't w3c Orthodox?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.