簡體   English   中英

帶有CSS屬性display的div:表單元閃爍

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM