2015-03-10 12 views
12

आर में एक बटन मैं एक selectizeInput के साथ नीचे संरेखित downloadButton के लिए एक रास्ता को समझ नहीं सकता, संरेखित,नीचे यानी चमकदार

enter image description here

library(shiny) 

runApp(list(
    ui = shinyUI(fluidPage(
    fluidRow(align="bottom", 
     column(12, align="bottom", 
      h4("Download Options:"), 
      fluidRow(align="bottom", 
         column(6, selectizeInput("plot_dl", "File Type", width="100%", 
               choices = list("PDF"="pdf","PNG"="png"))), 
         column(3, downloadButton('plot1_dl', 'Left Plot')), 
         column(3, downloadButton('plot2_dl', 'Right Plot')) 
      ) 
    ) 
    ), 
    tags$style(type='text/css', "#plot1_dl { width:100%; vertical-align:bottom}"), 
    tags$style(type='text/css', "#plot2_dl { width:100%;}") 
)), 
    server = function(input, output) { 
    } 
)) 

कहीं भी align="bottom" रखने और हर जगह एक त्रुटि संदेश फेंक नहीं है, लेकिन वांछित प्रभाव नहीं है। बटन के स्टाइल टैग के साथ चारों ओर खेलने का प्रयास किया, लेकिन मेरी गहराई से बाहर।

उत्तर

15

... मिला एक तदर्थ शैली टैग में margin-top: 25px साथ ठीक

enter image description here

library(shiny) 

runApp(list(
    ui = shinyUI(fluidPage(
    h4("Download Options:"), 
    fluidRow(
     column(6, selectizeInput("plot_dl", "File Type", width="100%", 
           choices = list("PDF"="pdf","PNG"="png"))), 
     column(3, downloadButton('plot1_dl', 'Left Plot')), 
     column(3, downloadButton('plot2_dl', 'Right Plot')) 
    ), 
    tags$style(type='text/css', "#plot1_dl { width:100%; margin-top: 25px;}"), 
    tags$style(type='text/css', "#plot2_dl { width:100%; margin-top: 25px;}") 
)), 
    server = function(input, output) { 
    } 
)) 
+1

हाँ मैं selectinput 'फ़ाइल प्रकार' के नाम के रूप में इस में रखने का सुझाव देते जा रहा था को प्रभावित करता है नियुक्ति –

+1

यह जब मैं यह कोशिश मेरे लिए कोई फर्क नहीं लगता है। हालांकि, मैं 'uiOutput()' का उपयोग कर रहा हूं। क्या इससे कोई फर्क पड़ सकता है ?? – theforestecologist

6

यह स्तंभ समारोह में style तर्क पारित करने के लिए है करने के लिए अन्य रास्ता।

 
runApp(list(
     ui = shinyUI(fluidPage(
       h4("Download Options:"), 
       fluidRow(
         column(6, selectizeInput("plot_dl", "File Type", width="100%", 
               choices = list("PDF"="pdf","PNG"="png"))), 
         column(3, style = "margin-top: 25px;", downloadButton('plot1_dl', 'Left Plot')), 
         column(3, style = "margin-top: 25px;", downloadButton('plot2_dl', 'Right Plot')) 
       ) 
     )), 
     server = function(input, output) { 
     } 
))