Ask a question about how the width of a simple css scroll bar is compatible with IE7 and IE6._html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:22:39
Original
1568 people have browsed it

RT.

For example, I have a div and define overflow-y:auto; max-height:440px;width:440px;
At this time, there is a table under it, which is defined as follows: width:100% ; border:1px solid #e2e2e2; border-collapse: collapse;
At this time, when the table content height is greater than 440px in Firefox, Google, IE8 or above, a scroll bar will appear, and the width of the table will automatically It becomes 420px, which is width-browser.scroll.width (I understand, typing Chinese characters is too troublesome).
However, under IE7, it will not automatically narrow to allow the scroll bar to flow out of width, but a scroll bar will appear below. If overflow-x:hidden is set, part of the table's content will be covered by scroll.



So, please give me some advice on how to adjust this?
Must be compatible with IE7 and 6, as required by the boss.


Reply to discussion (solution)

ie6 does not support max-height, written as: max-height:440px;_height:440px;

ie6 does not support max -height, written as: max-height:440px;_height:440px;

Man, I am asking about the width. . .

You can refer to http://bbs.blueidea.com/thread-3022471-1-1.html

You can refer to http://bbs.blueidea.com/thread-3022471-1 -1.html

There is obviously a BUG, ​​man!
I wrote a js myself to implement it.
var tah=$("#modelTab").css("height");
tah=tah.toString().replace("px","");
if(parseInt(tah )>400)
{$("#modelTab").css("width","425px");}


You can refer to http://bbs.blueidea .com/thread-3022471-1-1.html

There is obviously a BUG, ​​man!
I wrote a js myself to implement it.
var tah=$("#modelTab").css("height");
tah=tah.toString().replace("px","");
if(parseInt(tah )>400)
{$("#modelTab").css("width","425px");}

Bro, this seems to be a bug in IE6, and there is no unified solution. , only in roundabout ways. Just solve your problem

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!