2017-01-16 69 views
1

我已經嘗試過很多我要瘋了的東西。css html不受歡迎的div包裝

當瀏覽器的縮放被放大或者瀏覽器的右側被向左拖動以最小化瀏覽器的窗口寬度時,我該如何避免cgroup被環繞?

當div將cpanel的左上角從fpanel的右上角重新固定到fpanel的右下角時。

不要緊,最終產品在cgroup中有一個大網格。當頁面有時被打開時,取決於瀏覽器在屏幕上的大小,cpanel隱藏在頁面底部,看不見,因爲cpanel實際上低於瀏覽器窗口的底部。所以用戶的網格不存在。

感謝。

<!DOCTYPE html> 
 
<html> 
 
<head> 
 
    <title></title> 
 
    <meta charset="utf-8" /> 
 
</head> 
 
<body> 
 
    <div style="min-width: 1730px; min-height: 1050px; max-width: 1735px; max-height: 1055px; border-style:solid; border-width:1px; border-color:red; overflow: hidden;"> 
 
     <div id="mpanel" style="min-width: 1730px; max-width: 1730px; min-height: 35px; max-height: 35px; border-style:solid; border-width:1px; border-color:lightgray; background-color:slategray;"> 
 
     </div> 
 
     <div id="fpanel" style="float:left; min-width: 300px; max-width: 300px; min-height: 990px; max-height: 990px; border-style:solid; border-width:1px; border-color:lightgray; background-color:lightblue"> 
 
      fpanel 
 
     </div> 
 
     <div id="cpanel" style="float:right; min-width: 1430px; max-width: 1430px; min-height: 990px; max-height: 990px; border-style:solid; border-width:1px; border-color:lightgray; overflow: auto;"> 
 
      <div data-container="cgroup"> 
 
       cgroup-cpanel 
 
      </div> 
 
     </div> 
 
     <br style="clear: left;" /> 
 
    </div> 
 
</body> 
 
</html>

回答

2

調整#fpanel小號width296px(或任何值的好處你):

<div id="fpanel" style="float:left; min-width: 296px; max-width: 296px;"> 

摘錄如下:

<div style="min-width: 1730px; min-height: 1050px; max-width: 1735px; max-height: 1055px; border-style:solid; border-width:1px; border-color:red; overflow: hidden;"> 
 
    <div id="mpanel" style="min-width: 1730px; max-width: 1730px; min-height: 35px; max-height: 35px; border-style:solid; border-width:1px; border-color:lightgray; background-color:slategray;"> 
 
    </div> 
 
    <div id="fpanel" style="float:left; min-width: 296px; max-width: 296px; min-height: 990px; max-height: 990px; border-style:solid; border-width:1px; border-color:lightgray; background-color:lightblue"> 
 
    fpanel 
 
    </div> 
 
    <div id="cpanel" style="float:right; min-width: 1430px; max-width: 1430px; min-height: 990px; max-height: 990px; border-style:solid; border-width:1px; border-color:lightgray; overflow: auto;"> 
 
    <div data-container="cgroup"> 
 
     cgroup-cpanel 
 
    </div> 
 
    </div> 
 
    <br style="clear: left;" /> 
 
</div>

+2

謝謝。我發誓我爲此工作。但它現在看起來很棒並且效果很好。 – Steve