简体   繁体   English

CSS / R shiny:删除导航栏下方的填充

[英]CSS / R shiny: removing padding below navbar

I'm working on a shiny app but have very little web development expertise.我正在开发shiny 应用程序,但 web 开发专业知识很少。 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).我想知道我需要修改什么 CSS 元素/类以删除顶部导航栏和页面的 rest 之间的空白(由下面的红色箭头表示)。

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:我在浏览器中使用了文档资源管理器 (F12),似乎该部分称为navbar navbar-default navbar-static-top所以我尝试将以下 CSS 添加到页面:

.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.我已经让其他 CSS 为我的应用程序工作(例如,背景颜色),但这个很顽固。 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.将 .navbar.navbar-default.navbar-static-top 的 margin-bottom 设置为 0 有效。

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.问题是从导航应用的margin-bottom ,将其设置为零解决了我的问题,正如您在屏幕截图中看到的那样。 (Sharing your site was very helpful to troubleshoot) (分享您的网站对排除故障很有帮助)

.navbar .navbar-default .navbar-static-top {margin-bottom: 0px}

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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