简体   繁体   中英

How can I show the title in front of logo not under it in Shiny R

So the following code writes the title under logo while I want it to be in front of the logo. In titlePanel help in RStudio there's no help regarding positioning the title. Any hack for this?

shinyUI(fluidPage(
  list(tags$head(HTML('<img src="http://ic.pics.livejournal.com/oddharmonic/554743/66688/66688_600.gif" border="0" style="border:2px width="10"  height="10"   alt="Photo of Milford Sound in New Zealand!" />'))),
  div(style="padding: 0px 0px",
      titlePanel(
        title="University of Wisconsin-Madison Database Group", windowTitle="FML"
      )
  ),

This is how it looks like now: 在此处输入图片说明

This is what I can think of. You can wrap your <img /> tag inside a <h1>...</h1> as follows:

server <- function(input,output,session){  
}

ui <- shinyUI(fluidPage(
    list(tags$head(HTML('<h1> <img src="http://ic.pics.livejournal.com/oddharmonic/554743/66688/66688_600.gif" border="0" style="border:2px width="10"  height="10"   alt="Photo of Milford Sound in New Zealand!"/> University of Wisconsin-Madison Database Group</h1>')))
))

shinyApp(ui = ui, server = server)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM