简体   繁体   中英

CSS / R shiny: removing padding below navbar

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 (eg, background color), but this one is stubborn. Any help would be much appreciated. Thanks in advance.

在此处输入图像描述

Found the solution-

Setting the margin-bottom of.navbar.navbar-default.navbar-static-top to 0 works.

Cheers

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}

在此处输入图像描述

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM