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

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

问题描述

我一直在竭尽全力(并在规定的时间内)试图找出 Colorbox 在以下页面上无法正常工作的原因:[链接已删除]

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]

我在右下角设置了一个彩盒测试链接,上面写着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 hack 可以让内容正确显示,其中任何数量都可能导致这个问题.

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 文件同时存在没有冲突,因为即使完全删除了Thickbox,Colorbox 仍然存在问题.

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!!! .. 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">

.. 在页面的开头.它必须在包含或其他所有内容之前.

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

希望这会有所帮助.干杯!

Hope this helps. Cheers!

马里亚诺.

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

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