Hidden mystery why CSS-defined properties have no effect

Source: Internet
Author: User
Css

The overflow, overflow-x, overflow-y properties can be used to manage content that exceeds its container size, for example: <body style= "overflow-x: No" > indicates that the page does not appear with a horizontal scroll bar.

But when used! DOCTYPE declaration when a standard-compliant mode is opened, the overflow, overflow-x, and Overflow-y properties are applied to HTML elements and are not valid when applied to the BODY element.

There are two solutions:

1, the overflow, overflow-x, overflow-y attributes into the label;

2, or delete! DOCTYPE statement:

<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd";>



Related Article

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.