Formatting all labels in R Shiny / CSS tags

Viewed 183

I am trying to reformat all labels in my Shiny app. In doing so, I wanted to fall back on the tags and used the following solution:

tags$head(tags$style(
  HTML(
    "label {font-weight: italic; font-family:Times New Roman; margin-bottom:20px;}"
  )
))

Unfortunately, this doesn't change anything in my labels from the textInput, input picker, etc.

I appreciate any help!

1 Answers

Try:

HTML(
  "label.control-label {
    font-style: italic; 
    font-family: 'Times New Roman'; 
    margin-bottom: 20px;
  }"
)

or

HTML(
  "label {
    font-style: italic !important; 
    font-family: 'Times New Roman' !important; 
    margin-bottom: 20px !important;
  }"
)
Related