このコードを試してみてください:
明らかに、これは純粋な HTML+CSS コードでは使用できないものです。JS コードの助けを借りる必要があります。だから私はそれをjQueryで動かしました。
#parent{
width:500px;
background:#000;
}
#child1{
background:#ff0000;
float:left;
}
#child2{
background:#0000ff;
float:left;
}
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
$(document).ready( function(){
$("#child1").width($("#parent").width()-100);
$("#child2").width($("#parent").width()-$("#child1").width());
$("#child1").height($("#child1").width()*6);
$("#child2").height($("#child1").height());
alert($("#child1").width());
alert($("#child2").width());
alert($("#child1").height());
alert($("#child2").height());
});
</script>
<body>
<div id="parent">
<div id="child1"></div>
<div id="child2"></div>
</div>
</body>