I created a shiny app with a sidebar and card. I want to format the title as it appears (set in page_opts) to have a background color that spans the entire page and the title centered, I also want to set the background color of the side bar. I'm using a CSS file but nothing seems to take effect. I think I am not setting the correct CSS selectors but I find no documentation on how to determine which selectors to use for this. Any suggestions?
your best friend will be your browsers developer tools / inspector.
on windows with chromium type browser, Ctrl+Shift+ i
is the shortcut.
The tab to use is elements
Thank you for your response. I must be doing something wrong because the selectors don't seem to work. For example, I look at the element for the side bar, which is declared as:
<aside id="bslib_sidebar_0af946" class="sidebar">
but when I set the CSS for it in the file, it has no effect:
.sidebar{
background-color: #e2e3e4;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
If you use the developer tools inspector and investigate the element there is a calculated section you can use to see why a given property , like the background has been chosen, it should list competing rules that were less specific and not applied.
If thats not enough to help you, i think the next step would be for you to provide a reprex.
This helped a lot. Thank you
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.