Reputation: 107
I'm working on a shiny app but have very little web development expertise. I'm wondering what CSS element/class I need to modify to remove the white space between the top navigation bar and the rest of the page (indicated by the red arrow below).
I used the document explorer (F12) in my browser, and it seems that section is called navbar navbar-default navbar-static-top
so I tried adding the following CSS to the page:
.navbar .navbar-default .navbar-static-top {padding: 0px; !important}
But it had no effect. I've gotten other CSS to work for my app (e.g., background color), but this one is stubborn. Any help would be much appreciated! Thanks in advance.
Upvotes: 1
Views: 625
Reputation: 111
Found the solution-
Setting the margin-bottom of .navbar .navbar-default .navbar-static-top to 0 works.
Cheers
Upvotes: 3
Reputation: 1218
The problem is the margin-bottom
that is being applied from the nav, setting it to zero solved the problem for me as you can see on the screenshot. (Sharing your site was very helpful to troubleshoot)
.navbar .navbar-default .navbar-static-top {margin-bottom: 0px}
Upvotes: 1