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!