Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make dashboard box title bold using CSS

I am using R Shiny dashboard for a R shiny app. I have included css file to style the app. I need to change box title to bold. Below is minimal example of ui.R

library(shiny)
library(shinydashboard)

body <-
  dashboardBody(tags$head(
    tags$link(rel = "stylesheet", type = "text/css", href = "my_style.css")
  ),
  tabItems(tabItem(tabName = "test",
                   fluidRow(
                     box(
                       collapsible = TRUE,
                       width = 3,
                       status = "primary",
                       solidHeader = T,
                       title = "Test"
                     )
                   ))))

dashboardPage(dashboardHeader(), dashboardSidebar(), body)

And below is my_style.css file

.box.box-solid.box-primary>.box-header{
  background: rgb(0, 129, 201);
  color: #ffffff;
    font-size: 18px;
  font-weight; bold;
}

.box.box-solid.box-primary{
  font-family: OpenSans;
  font-size: 16px;
  text-align: left;
  color: #000000;
}

The problem is in .box-header portion. The box changes background color and text color; but not font-size and font-weight.

Any suggestions?

like image 295
Krina M Avatar asked Sep 02 '25 09:09

Krina M


1 Answers

What about:

.box-header h3 {
   font-weight: bold;
}
like image 164
C. Braun Avatar answered Sep 05 '25 15:09

C. Braun