[英]div's with CSS property display:table-cell flickers
无论我做什么,加载时都不会出现div的闪烁。
我在content div
有三个主要content div
。 他们是left, right and middle div
,里面的middle div
我已动态创建,我想宽度平分,以适合中间格菜单。
的CSS
#content{
width: 1000px;
display: table;
}
#left, #right, #middle{
float: none;
vertical-align: top;
display: table-cell;
}
#left, #right{
width: 200px;
}
#middle{
width: 600px;
min-width: 600px;
}
.. HTML
<div id="content">
<div id="left">very less text and images in this cell</div>
<div id="middle" style="<?php echo $middleWidth;?>">I have lot lots of images, hyperlinks and text in this page</div>
<div id="right">very less text and images in this cell</div>
</div>
的PHP
<?php
//some calculations..
$middleWidth = '602'.'px';
//this value is dynamic, I might get from 600px to any value that can be divided to get 0 remainder.
?>
当网站加载页面闪烁时,我可以看到中间内容的宽度为800px,即内容div的宽度减去左div的宽度。 即使我给出最小宽度,最大宽度,该flickr也不停止。
对我来说,另一个挑战是在IE上应该可以正常工作。
请帮我..
此语法不正确
<div id="content">
<div id="left">very less text and images in this cell</left>
<div id="middle" style="<?php echo $middleWidth;?>">I have lot lots of images, hyperlinks and text in this page</middle>
<div id="right">very less text and images in this cell</right>
</div>
</left>
</middle>
和</right>
无效的html
。 只需正常关闭div </div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.