Introduction to the function of min-width minimum width

Source: Internet
Author: User

If an element does not have a minimum width (min-width), when the browser shrinks to a certain extent, the layout in the element may change, if you want to keep the same can give elements (such as DIV) set the minimum width properties, the need for friends can refer to the following

In a Web page, if an element is not set to a minimum width (min-width), the layout in the element may change when the browser shrinks to a certain extent. If you want to keep the layout unchanged, you can set the minimum width property for that element (such as DIV), for example:

Copy Code code as follows:


<style>
#footer {
min-width:960px; /* The minimum width is set to 960 pixels, and when the browser width is less than the value, the element is no longer adaptive, but some elements are blocked. */
}
</style>
<div id= "Footer" ></div>

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.