2017-02-24 5 views
1

私は次のHTML/CSSを設定して、スペースを65%にして300pxテーブルを確保しました。いくら残っているかにかかわらず、残りのスペースを常に塗りつぶすようにしたいと思います。常にスペースを埋めるようにグラフのサイズを設定する方法

https://jsfiddle.net/horacebury/2vc606wx/17/

HTML:

<div ng-app="App"> 
    <div ng-controller="TodoCtrl"> 
    <div id="tablecontainer"> 
     <table class="tgh"> 
     <tr> 
      <td>Auxilliary Power</td> 
     </tr> 
     </table> 
     <div id="example"></div> 
     <table class="tg"> 
     <tr> 
      <td class="tg-yw4l" ng-repeat="item in items track by $index">{{item}}</td> 
     </tr> 
     </table> 
    </div> 
    <div id="c3chart"></div> 
    </div> 
</div> 

CSS:

#tablecontainer { 
    float: right; 
} 

#c3chart { 
    width: 65%; 
} 
+0

あなたの最善の選択肢は、あなたが早期にサポートする必要がない限り、[flex-box](https://css-tricks.com/snippets/css/a-guide-to-flexbox/)を使用することですIEのバージョン。 – user3432422

+2

ここでオーバーフロー:隠された答えを見てください - > http://stackoverflow.com/questions/1260122/expand-a-div-to-take-the-remaining-width結果:https://jsfiddle.net/2vc606wx/28 / – mgraham

答えて

関連する問題