2 つのブロックが並んでいます。1 つのサイズは固定されており90px
、もう 1 つは固定されていません。コンテナーのサイズが変更されるため、もう 1 つのサイズをコンテナーの残りの部分に拡張したいと考えています。
これは、問題を表示するコメンドのフィドルです: http://jsfiddle.net/L6CSG/
HTML
<div class="container">
<span class="left"></span>
<span class="right"></span>
</div>
CSS
.left, .right {
height: 30px;
display: inline-block;
margin: 0px;
float: left;
}
.left {
background: green;
width: 90px;
}
.right {
background: blue;
width: 100%; // How can I make it fit the rest of the container?
}
.container {
width: 400px; // This value is NOT STATIC
}