0

我设计了一个带有页眉页脚和正文标签的页面。对于页眉和页脚,我设置了宽度:100%;我设置了一个最小宽度:1024px;在 Firefox 和 IE 中它运行良好,当最小化窗口时它保持其最小尺寸,但在 googlechrome minwidth 中不起作用,当我最小化窗口页眉和页脚时只有窗口的宽度,当我向右滚动时有空白空间和它没有扩展 100%,但对于内容来说一切都很好。我在这里放了一些html和css代码。

<div id="f-page">
  <div style="width:100%; min-width:1024px; z-index:800;
   background-image:url(fimages/headerbg.gif); height:120px;"> 
   <center>
    <div id="f-header"></div>
   </center>
   </div>
   <div id="f-mypage"></div>
    <div id="f-footer">
     <center>
    <br />
    <h6> some text</h6>
     </center>            
</div>
</div>

CSS:

#f-footer
        {
           height:70px;  min-width:1024px;
           background-image:url('../f-images/ffoot.png');
           background-repeat:repeat-x;
        }
#f-header {width:1024px;height:120px;z-index:1000;}
#f-page {margin:0 auto;}
#f-mypage
        {
          width:1004px;height:auto; background-color:White; margin-top:10px;
          padding-bottom:30px;border:1px solid #cccfcb;
          -moz-box-shadow:5px 0 5px -5px #333,-5px 0 5px -5px #333;
          -webkit-box-shadow:5px 0 5px -5px #333,-5px 0 5px -5px #333;
          box-shadow:5px 0 5px -5px #333,-5px 0 5px -5px #333; 
        }

感谢您的帮助。

4

1 回答 1

0

Min-width is working fine in chrome.

Perhaps you need to set at background to see the effect:

 #f-footer
    {
      height:70px;  min-width:1024px;
         background-image:url('../f-images/ffoot.png'); background-repeat:repeat-x;
      background: red;
    }

Working fiddle: http://jsfiddle.net/basarat/uPTSd/

于 2013-04-29T06:25:42.073 回答