2011-04-05 90 views
1

sketch集裝箱浮動問題

嘿, 我有我的容器素描的一個大問題。我怎麼能意識到這一點?當我從兩個導航(藍色容器)中設置寬度時,位於徽標(紅色容器)下方。這兩個導航將穿過屏幕,在徽標旁邊。如果我調整瀏覽器窗口的大小,那麼兩個導航不應該在標誌下滑動。有沒有人爲我舉個例子?

<html lang="en"> 

<head> 
    <meta charset="utf-8" /> 
    <title>New</title> 
    <style type="text/css"> 

     .logo { 
      float: left; 
      width: 260px; 
      height: 50px; 
      background: green; 
     } 

     .nav-main { 
      background: red; 
     } 

     .nav-sub { 
      background: blue; 
     } 

    </style> 
</head> 

<body> 
    <div class="header"> 
     <div class="logo"> 
      .logo 
     </div> 
     <div class="nav-main"> 
      .nav-main 
     </div> 
     <div class="nav-sub"> 
      .nav-sub 
     </div> 
    </div> 

</body> 

+0

看到http://stackoverflow.com/questions/ 5540485 /如何叔o-make-an-inline-block-element-fill-the-remaining-of-the-line – schellmax 2011-04-05 07:59:34

+0

我需要DIV-Container並且沒有Table-Layout :-( – Patrik 2011-04-05 08:20:16

+0

你的代碼在哪裏? – sandeep 2011-04-05 08:36:50

回答