问题在IE中正确实施Colorbox(所有版本) [英] Issue Implementing Colorbox Correctly in IE (all versions)

查看:114
本文介绍了问题在IE中正确实施Colorbox(所有版本)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在拉我的头发(和分配的时间),以尝试弄清楚为什么Colorbox在以下页面上无法正常工作:[link removed]

I've been pulling my hair out (and going way over allotted hours) to try and figure out why Colorbox isn't working properly on the following page: [link removed]

我在右下方设置了一个Colorbox测试链接,它说Web Design By All Web Cafe,这应该会打开一个小的标志图像。在Firefox,Safari等中,模态的行为应该是,打开中心中心的所有现有的页面内容。在IE中,不仅模态不居中,而且它似乎不服从绝对定位,并将所有现有的页内内容推到下面。除此之外,它没有打开正确的大小和创建滚动条旁边的模态图像,我们有一个丑陋的模式。

I've set up a Colorbox test link on the very bottom right that says "Web Design By All Web Cafe", which should open up a small logo image. In Firefox, Safari, etc the modal behaves as it should, opening center center above all of the existing on-page content. In IE, not only is the modal not centered, but it appears as though it's not obeying absolute positioning and pushing all of the existing on-page content down below. Add to that the fact that it's not opening to the correct size and creating scrollbars next to the modal image, and we have ourselves one ugly modal.

滚动条我可以住(通过调整模态的最小高度),但我不知道为什么它不会中心。让我说我最初没有编写这个网站,它是在几年前完成,所以很可能有大量的CSS黑客来正确显示,任何数量的可能会导致这个问题。

The scrollbars I can live with (by just resizing the min-height of the modal), but I can't figure out why it won't center. Let me say that I did not code this site initially and it was completed quite a few years ago, so there are quite probably numerous CSS hacks to get things to display properly, any number of which may be causing this problem.

相比之下,Thickbox也设置在这个网站上(如果你点击播放视频标注在深蓝色区域),行为正确,虽然受到一些奇怪的大小/填充问题,因此希望用一些更现代和可扩展的东西替换它。我可以验证没有冲突同时有这两个模态脚本/ CSS文件同时,因为问题仍然发生Colorbox,即使当Thickbox被完全删除。

By contrast, Thickbox is also set up on this site (if you click on the "Play Video" callout in the dark blue area) and behaves correctly, though suffers from some weird sizing/padding issues, hence the desire to replace it with something a bit more modern and extensible. I can verify that there is no conflict having both of these modal scripts/CSS files concurrently as the problem still occurs with Colorbox even when Thickbox is removed entirely.

任何想法或建议将非常感谢。

Any thoughts or suggestions would be greatly appreciated.

推荐答案

GOT IT! ..修改后的许多事情在我的代码(有相同的问题)...

GOT IT!!! .. after modifying A LOT of things in my code (had the same issue) ...

只需输入:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

..它必须是BEFORE包含或其他任何东西。

.. at the very begining of your page. It has to be BEFORE includes or everything else.

希望这有助于。
干杯!

Hope this helps. Cheers!

Mariano。

这篇关于问题在IE中正确实施Colorbox(所有版本)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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