Мы можем использовать <тело> вместо #container отделения?

Когда данные, которые я представляю, являются, действительно, табличными.

я нахожу его смешным, что некоторые веб-разработчики использовали отделения на табличных данных на некоторых сайтах.

Еще одно использование я имел бы для него, будет формы, особенно маркируют: пары текстового поля. Это могло технически быть сделано в полях отделения, но очень, намного легче сделать это в таблицах, и можно утверждать, что label:textbox пары являются на самом деле табличными по своей природе.

7
задан Jitendra Vyas 10 November 2009 в 18:35
поделиться

1 ответ

Your example answers your question! Body is a block element like any other. It has width, height, padding, margin and border properties.

  • Note that it is essential that the page is rendered in strict, rather than quirks, mode to be able to treat the body element as a block-level element; otherwise it is treated as the documentElement and all bets are off. – NickFitz

Then can we use body in place of #container div? – Jitendra

  • Nice theory. Shame about Microsoft. – David Dorward
  • @Jitendra: you can, but be thorough with your cross-browser testing, particularly when it comes to scrolling :-) – NickFitz

What is the difference between viewport and body? – Jitendra

  • the viewport is the visible area of the browser window which displays the document. The body is an element in the document. In quirks mode, the body will also be treated as the documentElement: that is, the root node of the document, which will fill the window, and if necessary will be able to be scrolled. In strict mode, the html element will be treated as the documentElement, and the body will be a child of that. As an experiment, change your test page by adding the style rule html { background-color: #00f; } - you will see that the html element contains the `body' – NickFitz
7
ответ дан 7 December 2019 в 07:46
поделиться
Другие вопросы по тегам:

Похожие вопросы: