how to add logo in shinyapp and hide the css

when i add the logo in shiny . I want the logo and the title both at the first line.

it will show the css code in title name . Any way to solve this ?

Code:
ui = fluidPage( titlePanel(title=span(img(src="logo.jpg"),"Its the new title")),


shinyapp page:

AA16-02-22-04

if you can use the shinydashboard package then you can do something like this :

header <- dashboardHeader(
  title =
    tags$li(
      div(
        style = "display : inline-block; float:left;",
        img(
          src = "mylogo1.png",
          height = 75,
          width = 190
        )
      ),
      h2(
        " - My Title!"
      ),      img(
        src = "mylogo2_small.png",
        height = "50",
        width = "45",
        style = "display: inline-block;
                margin-right: 10px;
                margin-top: 12px;
                float:right;"
      )
    ),
  tags$li(class = "dropdown", tags$link(
    rel = "stylesheet",
    type = "text/css",
    href = paste0("app.css?v={",as.character(runif(1)),"}") #loading my css with a randomstring so as to invalidate cacheing
  ))
)

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.