2016-09-16 5 views
1

私の光り輝くアプリケーションでは、2つの列と2つの行としてレンダリングする4つのラジオボタンがあります。しかし、私は、アプリケーションを実行すると、タイトルラベルは、最初の3行を最初の列と2行2列目にする最初の位置になります。ここで問題となるのは、2列目の最初のラジオボタンが、1列目の最初のラジオボタンではなく、ラベルと揃うことです。どのように私はこれを修正するのですか?次のようにコードは、これまでのところです:光沢のある複数の列にラジオボタンを配置する

library(shiny) 
radioLab <-list(tags$div(align = 'left', 
         class = 'multicol', 
         radioButtons(inputId = 'typeofanalysis', 
             label = "TRIPS & TRAVELS", 
             choices = c("OVERNIGHT TRIPS - LAST 365 DAYS","OVERNIGHT TRIPS - LAST 30 DAYS", "SAMEDAY TRIPS - LAST 30 DAYS","LONG DURATION TRIPS - 180-365 DAYS"), 
             selected = "OVERNIGHT TRIPS - LAST 365 DAYS", 
             inline = FALSE), style = "font-size:75%")) 

multicolLab <- list(tags$head(tags$style(HTML(" 
             .multicol { 
             height: 200px; 
             width: 600px; 
             -webkit-column-count: 2; /* Chrome, Safari, Opera */ 
             -moz-column-count: 2; /* Firefox */ 
             column-count: 2; 
             -moz-column-fill: auto; 
             -column-fill: auto; 
             } 
             ")))) 

ui <- shinyUI(
navbarPage("TITLE", 
    tabPanel("TABULATE", 
     multicolLab, 
      fluidRow( 
       column(width = 6, radioLab, align = "center"), 
       column(6) 
      ) 
))) 

server <- shinyServer(function(input, output) { 

}) 

shinyApp(ui,server) 

答えて

1

あなたはそれが働いていた....ありがとう...素敵... .shiny-options-groupにあなたのCSSをターゲットとし、また、いくつかの値

.shiny-options-group { 
    height: auto; 
    width: 600px; 
    -webkit-column-count: 2; /* Chrome, Safari, Opera */ 
    -moz-column-count: 2; /* Firefox */ 
    column-count: 2; 
    -webkit-column-fill: balance; 
    -moz-column-fill: balance; 
    column-fill: balance; 
    margin-top: 0px; 
} 

.control-label { 
    padding-bottom: 10px; 
} 

div.radio { 
    margin-top: 0px; 
    margin-bottom: 0px; 
    padding-bottom: 5px; 
} 
+0

ああを調整する必要があります。 – Apricot

関連する問題