Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.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 切换下面的div可更改单击的div的宽度_Jquery_Css - Fatal编程技术网

Jquery 切换下面的div可更改单击的div的宽度

Jquery 切换下面的div可更改单击的div的宽度,jquery,css,Jquery,Css,js 为什么单击#rightop(切换下面的div)会更改#rightop的宽度几个像素 这只发生在Chrome上,而不是Firefox上 我试图用JSFIDLE重现这个问题——但在这里没关系,宽度没有变化。(这是电话号码) 这里有一个-如果有人可以点击标题(名为KLANICA)并检查为什么标题会在Chrome中更改其宽度 将CSS更新为以下内容以获得解决方案: $('#rightTop').click(function(){ $('#rightBottom').toggle(); })

js

为什么单击
#rightop
(切换下面的div)会更改
#rightop
的宽度几个像素

这只发生在Chrome上,而不是Firefox上

我试图用JSFIDLE重现这个问题——但在这里没关系,宽度没有变化。(这是电话号码)


这里有一个-如果有人可以点击标题(名为
KLANICA
)并检查为什么标题会在Chrome中更改其宽度

将CSS更新为以下内容以获得解决方案:

$('#rightTop').click(function(){
    $('#rightBottom').toggle();
});

谢谢,但我需要的是桌子,而不是遮住显示器。如果我更改为“阻止”,所有设计都将关闭..ch#divR{显示:表格单元格;表格布局:固定;宽度:723px;}请停止回答,无需解决方案。我不是改变整个站点布局的解决方案(表应保持100%宽度)。目前在#divR上没有设置宽度,在#divL上有一个设置宽度。容器仍然是100%。也许可以尝试将#divL更改为25%宽度,将#divR更改为75%宽度,然后添加表格布局:固定为#divRNo,左侧单元格应固定为300像素。
#wrapp{
    display:table;
    width:100%;
}
#left{
    display:table-cell;
    width:30px;
    padding-left:0.5%;
    background:green;
}
#right{
    display:table-cell;
    background:blue;
}
#rightTop{
    width:90%;
    margin:0 auto 2px auto;
    background:yellow;
    line-height:27px;
    cursor:pointer;
}
#rightBottom{
    width:90%;
    margin:0 auto 25px auto;
    background:#e1e1e1; 
    text-align:justify;
}
$('#rightTop').click(function(){
    $('#rightBottom').toggle();
});
.ch #divR {
display: table-cell;
table-layout: fixed;
width: 75%;
}

.ch #divL {
display: table-cell;
width: 25%;
padding-left: 0.5%;
}