I'm trying to create a shiny dashboard page and whenever I put text into dashboard body part, there is a huge chunk of whitespace that I would like to remove. Here is a picture of the dashboard:
There's the spacing between the testing and the top bar. I'm wondering how I can remove that spacing? Of course I don't want it to be all crammed/close together, but I don't want a huge block of whitespace at the top. Here is my coding for the dashboard:
dashboardHeader(title = "Title"),
dashboardSidebar(width = 270,
sidebarMenu(
menuItem("Home", tabName = "home", icon = icon("home"))
),
dashboardBody(
tabItem(tabName = "home",
h4("testing")
)
)
I've tried to do a css file and do padding-top
and margin
, it didn't work out and turned out messy. Anyone know how to fix this?
h1, h2, h3, h4 generally come with a margin-top.
try css-
h4 {
margin-top: 0;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.