Highcharts父母身高100%,身高50%

时间:2017-02-07 09:24:15

标签: css highcharts

图表自动设定父母父高的全高。 Totaly忽略了他的父母身高。

HTML:

<div class="wrapper">
  <div class="huj2">
    <div class="huj">
      bla bla
    </div>
    <div class="huj">
      <div id="ChartContainer2">
        //Chart is here
      </div>
    </div>
  </div>
</div>

CSS:

#ChartContainer2 {
  width: 100%;
}

.huj {
  height: 50%;
  position: relative;
}

.huj2 {
  height: 100%;
}

.wrapper {
  position: fixed;
  height: 100%;
  width: 100%;
}

小提琴 - http://jsfiddle.net/a40a0bjy/17/

1 个答案:

答案 0 :(得分:4)

将您的高图表容器高度设为100%,它将起作用。下面是你小提琴的代码解决方案。

#ChartContainer2 {

  width: 100%;
  height:100% ;

}
相关问题