I'm making my first shiny application and am having trouble linking an external css file. I've seen a few references where people have explained how to do it and even showed example code, but I haven't had any luck. Most of the example I've seen it working used the bootstrapPage, like this:
shinyUI(bootstrapPage(
tags$head(
tags$title('Example linked stylesheet'),
tags$link(rel = 'stylesheet', type = 'text/css', href = 'assets/ace-shiny.css'),
))
I'm using fluidPage, and don't know if that's my problem. My attempt is below. I've confirmed that my working directory is where I think it is, and contains the "Assets" folder which holds the css file. I know the tags$head
bit is working, since if I uncomment the tags$style
there, it gets applied.
shinyUI(fluidPage(
tags$head(
tags$link(rel="stylesheet", type="text/css", href="assets/styles.css")
#tags$style(type='text/css', "body {background-color: black;}")
))
My CSS at this stage is simple (below), so I know it's not the problem.
body {background-color: red;}
Am I missing something obvious? Thanks for reading.
Mike