dongzhi6382 2013-08-12 16:13
浏览 65

div与CSS属性显示:table-cell闪烁

Whatever I do, I am not getting my div's flicker on loading.

I have three main divs inside the content div. they are left, right and middle div, Inside the middle div I have dynamically created menus that I want the width to be equally divided to fit to the 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.
?>

while the website loads the page flickers, I can see the middle content taking width of 800px that is width of content div minus width of left div. even though I am giving min-widht, max-width, the flickr is not at all stopping.

One more challenge for me is thing should work on IE.

Please help me..

  • 写回答

1条回答 默认 最新

  • douchigu1723 2013-08-12 16:17
    关注

    This syntax is not correct

    <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> and </right> is not valid html. Just close the divs normally </div>

    评论

报告相同问题?

悬赏问题

  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用