Style problems caused by lack of HTML Doctype

Source: Internet
Author: User

The absence of Doctype on the top of the html page may affect the layout and style a lot. If you cannot find the cause of the problem from the style and position details, you must first consider whether the Doctype document type declaration is missing. Currently, the commonly used Doctype is of the html5 type:

  1. <! DOCTYPE html>

This statement puts IE8 and IE9 in the Standards Mode standard Mode, IE7 and IE6 in the Almost Standards Mode standard compatible Mode, and Firefox and other modern browsers are basically in the Standards Mode standard Mode. For details, refer to this table.

 

Collect the symptoms of missing Doctype:

1. It is useless to adjust the absolute positioning element offset.

2. In Firefox and Chrome, table font-size does not inherit the size of the parent element, which is somehow several pixels larger.

In the first step, we added the "font-size: inherit;" to the table element and found that there was still no Doctype problem.

 

3. The hover effect of the non-a link element does not apply.

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.