How to solve the Overflow:auto invalid method in IE7

Source: Internet
Author: User
This article mainly describes how to solve the IE7 in the Overflow:auto invalid method, has a certain reference value, now share to everyone, the need for friends can refer to

Cause
The Overflow:auto property of the parent element is invalidated when the parent element's immediate child or subordinate child element's style has the position:relative property.

Solutions
Solving this bug is simple, using position:relative in the parent element ; To resolve the bug.

Code bug Recurrence

<ul><li> I am very hard front-end blog, hope you will like </li><li> I am very hard front-end blog, hope you will like </li><li> I was very hard front-end blog, Hope you will like </li><li> I am very hardworking front-end blog, hope you will like </li><li> I am very hard front-end blog, hope you will like </li></ul>
Ul{overflow:auto; height:100px;} li{position:relative; height:30px; line-height:30px;}

Strange bugs appear in IE7, with scrollbars appearing but unable to pull the scroll bar. The solution is to give ul{position:relative;}

IE7 Float:right will change line
Previously thought is IE6 will appear, did not expect IE7 also have this bug, online a lot of said to put the elements of FLoat:right in front, this is how 2 idea ah. At the expense of the location of an element to solve this bug, sometimes you look at the code is a bit silent, the solution can give the parent layer a relative positioning, and then to the right plus an absolute positioning to achieve . I think it's a little more reliable.

The above is the whole content of this article, I hope that everyone's learning has helped, more relevant content please pay attention to topic.alibabacloud.com!

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.