如何将两个 div 并排放置,其中一个在两个 div 的容器中居中
如何将第二个 div 直接放在第一个 div 旁边并使其扩展到右侧?
这是一个例子:
HTML:
<div id="container" >
    <div id="div1"> </div>
    <div id="div2"></div>
</div>
CSS:
  #container{ width: 100%;
              display:inline;
              height:60px;
              color:#000;
    }
    #div1{ margin-left:auto;
           margin-right:auto;
           width:200px;
           height:50px;
           background-color:#333;
    }
    #div2{ float:right;
           width:100%;
           height:50px;
           background-color:#ccc;
    }
谢谢。