IE6,xhtml,滚动条和你 [英] IE6, xhtml, scrollbars and you

查看:55
本文介绍了IE6,xhtml,滚动条和你的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,你们在这里都很聪明。回答我这个:


IE6在标准模式下似乎没有隐藏身体元素上的滚动条

(溢出:隐藏)这不是这个一个窘境。我知道,我需要在

中指定html。滚动条确实隐藏在Gecko浏览器上,所以

浏览器开发者之间肯定存在分歧如何实现滚动条(作为旁注,Gecko浏览器以其众所周知的方式)

错误的调整大小代码似乎总是搞砸了,当被要求伸展和

滚动div,即使每次调整大小都重新加载页面!)


我的第一个想法是修改生成样式表的CGI,因为我已经有代码在隐藏滚动条时弃用文档类型

在IE6上是必需的(但不是IE5。)这是基于简单的经验

证据,标准模式下IE6上的滚动条仍然存在,所以

是最优的文档类型(XHTML strict)不能使用。所以我可以只是改变这个来为IE6输出一个html样式(而不是一个体型)和

失去了弃用(这不是必需的)点。)


所以问题是这个。鉴于基于CGI的浏览器处理这些类型的调整是b / b $ b版本是禁忌,在动态生成主体样式之前,你会在

客户端检查什么? /或html

元素?看起来你不能只发送两个,因为这肯定会打破一些旧的浏览器(我知道你可以做一些评论等等,

但是那个仅适用于NS4和IE3 AFAIK。)


documentElement是我能想到的唯一标志

模式和NS6 / Mozilla支持这个AFAIK 。


IE或许有条件的评论?我不想在实际文档中对一个

浏览器版本号的测试进行硬编码(原因很明显),但是我猜这是浏览器的另一种选择。版本暴露于这些

的东西。


我没有看到任何其他方式来处理这样的情况比使用

服务器端代码,查看浏览器的版本号,并进行必要的调整

。并且有许多小的差异,比如这个

,似乎没有可行的客户端解决方案。有一些DirectX

的东西(可能是一个物体检测到的)和时髦的彩色滚动条

(嘿,人们要求它们)和文档边距(Opera稍微做了一些

与我回忆的其他内容不同)现在这个滚动条的东西。


哦。如果对所有这些都有一个明确的客户唯一答案,那么我会很乐意听到它!
否则,对#$ @%滚动条的任何想法都是

赞赏。


一切顺利,

Michael Jibbering

Okay, you are all so smart in here. Answer me this:

IE6 in standards mode doesn''t seem to hide scrollbars on the body element
(overflow:hide) Ain''t this a quandary. I have it in my head that I need to
specify html instead. The scrollbars do hide on Gecko browsers though, so
there is definitely a disagreement among browser developers on how to
implement scrollbars (as a side note, Gecko browsers with their notoriously
bug-ridden resize code seem to always screw up when asked to stretch and
scroll divs, even when the page is reloaded on every resize!)

My first thought is to modify the CGI that generates the style sheet as I
already have code that deprecates the document type when hidden scroll bars
are required on IE6 (but not IE5.) This is based on the simple empirical
evidence that the scroll bars are still there on IE6 in standards mode, so
the optimal document type (XHTML strict) cannot be used. So I could just
change this to output an html style (rather than a body style) for IE6 and
lose the deprecation (it wouldn''t be needed at this point.)

So the question is this. Given that CGI-based processing of browser
versions for these kinds of tweaks is taboo, what would you check on the
client side before dynamically generating the style for the body and/or html
element? It doesn''t seem like you could just send both as this would surely
break some older browsers (I know you can do tricks with comments and such,
but that only works for NS4 and maybe IE3 AFAIK.)

documentElement is the only thing I can think of that indicates standards
mode and NS6/Mozilla support this AFAIK.

IE Conditional comments perhaps? I would hate to hard-code a test for a
browser version number into the actual document (for obvious reasons), but I
guess it is an alternative if the browser version is exposed to these
things.

I don''t see any other way to deal with a situation like this than with
server-side code that looks at the browser''s version number and makes the
necessary adjustment. And there are lots of little differences like this
that just don''t seem to have viable client-only solutions. There''s DirectX
stuff (probably is an object detect for that) and funky colored scrollbars
(hey people ask for them) and document margins (Opera did them slightly
differently than the rest as I recall) and now this scrollbar thing.

Oh well. If there is a definitive client-only answer to all of this then I
would love to hear it! Otherwise, any thoughts on the #$@% scrollbars is
appreciated.

All the best,
Michael Jibbering

推荐答案

@%scrollbars

赞赏。


一切顺利,

Michael Jibbering
@% scrollbars is
appreciated.

All the best,
Michael Jibbering


2003年9月4日星期四00:08:08 GMT,没有人 <无** @ nope.net>写道:
On Thu, 04 Sep 2003 00:08:08 GMT, "Nobody" <no**@nope.net> wrote:
这是基于简单的经验证据,即标准模式下的滚动条仍然存在于IE6上,因此
最佳文档类型(XHTML)严格)不能​​使用。


Internet Explorer并不声称支持XHTML,因此你不能使用正确的mime类型发送XHTML,你依赖附录C

XHTML 1.0的修复,我当然看不出这是怎么回事

最佳。这可能是第一个看的地方。

哦。如果对所有这些都有明确的客户唯一答案,那么我很乐意听到它!否则,对#
This is based on the simple empirical
evidence that the scroll bars are still there on IE6 in standards mode, so
the optimal document type (XHTML strict) cannot be used.
Internet explorer does not claim to support XHTML, so since you cannot
send XHTML with the correct mime-type, you''re relying on Appendix C
fixup of XHTML 1.0, and I certainly can''t see how that is in any way
"optimal". This is probably the first place to look.
Oh well. If there is a definitive client-only answer to all of this then I
would love to hear it! Otherwise, any thoughts on the #


@%滚动条的任何想法都表示赞赏。
@% scrollbars is
appreciated.




我看不到javascript问题,正确的地方将是一个

样式表组,解决方案当然不依赖于javascript。


Jim。

-

comp.lang.javascript常见问题 - http: //jibbering.com/faq/



I can''t see the javascript question, the correct place would be a
stylesheets group, the solution certainly doesn''t rely in javascript.

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/


这篇关于IE6,xhtml,滚动条和你的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆