Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 配色箱IE7高度问题_Jquery_Html_Css_Colorbox_Internet Explorer 7 - Fatal编程技术网

Jquery 配色箱IE7高度问题

Jquery 配色箱IE7高度问题,jquery,html,css,colorbox,internet-explorer-7,Jquery,Html,Css,Colorbox,Internet Explorer 7,我遇到了一个只在IE7中出现的问题。通过JavaScript函数,我启动了一个colorbox。我在参数中定义高度和宽度 与其他浏览器相比,IE7似乎使colorbox的高度缩短了40px。这将导致滚动条可见,以容纳现在比颜色框本身更大的内容 function LoadColorbox(url) { jQuery.colorbox({ href: url, iframe: true, opacity: 0.7, height: 560, width: 878, top: 53 }); }

我遇到了一个只在IE7中出现的问题。通过JavaScript函数,我启动了一个colorbox。我在参数中定义高度和宽度

与其他浏览器相比,IE7似乎使colorbox的高度缩短了40px。这将导致滚动条可见,以容纳现在比颜色框本身更大的内容

function LoadColorbox(url) {
    jQuery.colorbox({ href: url, iframe: true, opacity: 0.7, height: 560, width: 878, top: 53 });
}

以前有人遇到过这个问题吗?

是的,我有,我相信在我的情况下,这是一个填充/边距问题。试着将它们也设置为0,看看它能做什么。

好的,我已经解决了

根本原因:我认为colorbox在不同浏览器(如IE6、IE7、IE8、IE9)中呈现自己的方式是不同的。我通过IE开发工具栏检查DOM时注意到了这一点

细节:在我的场景中,我试图隐藏颜色框的某些元素,例如下一个和上一个按钮,但没有以足够的方式为IE7隐藏。在其他浏览器上,颜色框的高度被排除在底部透明控件的高度之外,而IE7在计算我的内容高度时似乎考虑了控件的高度

我要修复的代码: Colorbox.css

    /* Unused elements */
    #cboxTitle,#cboxCurrent,#cboxNext,#cboxNext,#cboxPrevious,#cboxSlideshow,  #cboxTopLeft,#cboxTopCenter,#cboxTopRight,#cboxBottomLeft,#cboxBottomCenter,#cboxBottomRight
    {display:none;height:0px;width:0px;}

希望这有帮助

您好,Graeme,colorbox()中没有边距/填充参数,我尝试在colorbox.css中将所有填充和边距设置为0,但没有成功。您是否有可能准确地记得您更改的边距/填充?谢谢你的帮助