如何消除Shiny中流体流之间的顽固白色空间?

时间:2017-07-22 02:10:14

标签: html css r shiny whitespace

我在Shiny中的UI列中有两个fluidRows。

我希望顶行在其上方留出一些空间,但我想消除行之间的任何空格

  • 我尝试了divtags以及各种样式参数,例如margin: 0pxpadding: 0px ...,但我无法获得间距相应地采取行动。

    • 以下是一个例子:

      ui <- fluidPage(
      fluidRow(
      column(1,offset=0,
             div(style = "font-size: 10px; padding: 14px 0px; margin:0%",
                 fluidRow(
                   sliderInput(inputId = "sizeSlide", label = "Sizing", value = 10, min = 1,max = 20)
                 )
             ),
             div(style = "font-size: 10px; padding: 0px 0px; margin:0px", 
                 fluidRow(
                   radioButtons(inputId = "greatORless", label = "DBH Limiter", choices = c(">", "<"), selected = ">")
                 )                                      
             )
          )
        )
      )
      

我得到的是:

enter image description here (注意行之间的大[不需要]空间)

我想要的是:

enter image description here (注意行之间的空间要小得多)

我该怎么做?

1 个答案:

答案 0 :(得分:3)

您可以在Pattern上使用负值,在这种情况下,使用margin仅影响上边距。我更喜欢使用相对单位,但您可以使用像素而不是margin-top:-2em

em