How does css + div solve content overflow and css div content overflow?

Source: Internet
Author: User

How does css + div solve content overflow and css div content overflow?
In normal times, when we layout, some text content will exceed the height of our limit, and some images will break through the DIV, causing webpage dislocation. CSS style to automatically hide content that overflows beyond the width and height of the DIV border so that we need to solve how to use CSS to automatically hide content that exceeds the configured CSS width and CSS height, it does not support DIV layout.
Especially in IE6, if the content exceeds the object height and width, it will be broken and increased. In this case, we can use the following solutions.
Solve CSS styles
In this case, we can use the CSS overflow style to solve the problem: the corresponding style overflow: hidden
Div {overflow: hidden}
After this setting, if the DIV object is set to a certain width and height, adding overflow: hidden will hide the content that exceeds the DIV width and height, including the image.

1. Hide text content beyond the width of the object
2. Hide images that exceed the object width


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.