CSS对于chrome和mozilla [英] CSS For chrome and mozilla

查看:95
本文介绍了CSS对于chrome和mozilla的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在页面上有一个浮动div,其左边是通过表达式计算的

left:expression(document.body.clientWidth - 9 - (this.style.width.substr(0, this.style.width.length - 2))+''px'');

这个表达式在IE所有版本中运行良好,但在chrome和mozilla中没有。



所以,任何人都可以帮我找到相当于那个可以在所有三种浏览器中运行的表达式。



先谢谢

解决方案





在你的jquery部分尝试这个在脚本标签中。



 


(#DivID)。css(left , document body 。< span class =code-leadattribute> clientWidth - 9 - this 样式 width .substr( 0 style width length - 2 + 'px');





谢谢


我替换现有的CSS



.PageMes​​sageIFrame

{

z-index: 1003;

position:absolute;

left:expression(document.body.clientWidth - 5 - (this.style.width.substr(0,this.style.width) .length - 2))+''px'');

}



这个css



.PageMes​​sageIFrame

{

z-index:1003;

position:absolute;

底部:0px;

右:0px;

}



感谢所有......

I have a floating div on page whose left is calculated by expression
left: expression( document.body.clientWidth - 9 - ( this.style.width.substr( 0, this.style.width.length - 2 ) ) + ''px'' );
this expression is working fine in IE all versions but not in chrome and mozilla.

So, can any body help me to find the equivalent to that expression which can works in all three browsers.

Thanks In advance

解决方案

Hi,

try this out in your jquery section with in script tag.


("#DivID").css("left",( document.body.clientWidth - 9 - ( this.style.width.substr( 0, this.style.width.length - 2 ) ) + 'px' );



Thanks


I replace existing css

.PageMessageIFrame
{
z-index: 1003;
position: absolute;
left: expression( document.body.clientWidth - 5 - ( this.style.width.substr( 0, this.style.width.length - 2 ) ) + ''px'' );
}

with this css

.PageMessageIFrame
{
z-index: 1003;
position: absolute;
bottom : 0px;
right : 0px;
}

Thanks to all...


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

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