将子元素高度设置为max({own height},{父级内其他子元素的高度})

时间:2016-02-18 20:11:38

标签: css shiny

以下页面的结构包含

dashboardBody(
wellPanel(
  fluidRow(
    box(width = 6,
          DT::dataTableOutput("topLineTable"),
          uiOutput("promoOverlapUI")
    ),
    box(width = 6,
        selectInput("selectGraph2", label=NULL, choices=NULL),
        uiOutput("baselineGraphUI2")
    )
  ),
  #other stuff...
)

enter image description here

我想这样做,因此较短的元素会扩展以填充fluidRow。我试过身高= 100%没有成功。不展开的元素是box()col-sm-6生成box()) 我想避免绝对像素尺寸。

1 个答案:

答案 0 :(得分:1)

您可以在display:flex;row类上使用col-sm-6

您可以添加:

tags$style(HTML("div.row,div.col-sm-6 {display:flex;}"))

dashboardbody为例。