Unnecessary list elements generated by dazzling navbarPage

While developing an app with shiny using navbarPage, I noticed that there are some unwanted li tags in the HTML that are not defined in my code. Could this be a known bug? How can I go about fixing it?

<nav class="navbar navbar-default navbar-static-top" role="navigation">
    <div class="container-fluid">
      <div class="navbar-header">
        <span class="navbar-brand">app with shiny</span>
      </div>
      <ul class="nav navbar-nav shiny-tab-input" id="top-bar-nav-panel" data-tabsetid="2774">
        <li>
          <a href="#tab-2774-1" data-toggle="tab"></a>
        </li>
        <li>
          <a href="#tab-2774-2" data-toggle="tab"></a>
        </li>
        <li>
          <a href="#tab-2774-3" data-toggle="tab"></a>
        </li>
        <li class="active">
          <a href="#tab-2774-4" data-toggle="tab" data-value="App">
            <i class=" fa fa-rocket fa-fw" role="presentation" aria-label=" icon"></i>
            App
          </a>
        </li>
        <li>
          <a href="#tab-2774-5" data-toggle="tab" data-value="Guide">
            <i class=" fa fa-book fa-fw" role="presentation" aria-label=" icon"></i>
            Guide
          </a>
        </li>
        <li>
          <a href="#tab-2774-6" data-toggle="tab" data-value="Team">
            <i class=" fa fa-users fa-fw" role="presentation" aria-label=" icon"></i>
            Team
          </a>
        </li>
      </ul>
    </div>
  </nav>

This is the code that I am using in the shiny app

ui <- navbarPage(title = "app with shiny",
  windowTitle = "app with shiny",
  id = "top-bar-nav-panel",  
  theme = shinytheme("lumen"),

  # Head tags
  tags$head(
    tags$link(rel = "stylesheet", type = "text/css", href = "css/general.css"),
    tags$link(rel = "stylesheet", type = "text/css", href = "css/space.css"),
    tags$link(rel = "stylesheet", type = "text/css", href = "css/button.css"),
    tags$script(src = "js/console.js"),
  ),

  # Set up shinyalert
  useShinyalert(), 
  # Set up shinyjs 
  useShinyjs(),
  # Set as default panel the one with the id "App"
  selected = "App",
  tabPanel("App", icon = icon("rocket"), #code here),
  tabPanel("Guide", icon = icon("book"), #code here),
  tabPanel("Team", icon = icon("users"), #code here)
)

I am also utilizing shinyjs and other R packages for additional functionalities that I will implement later on 😁.

Answer №1

Applying this CSS code appears to alleviate some of the excess white space caused by empty li tags, although they remain present.

.navbar-header > * {
    margin-right: -4em;
    margin-bottom: -4em;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Do remote resource links remain accessible when there is no connection to the internet?

I have incorporated remote resources such as jQuery and icons by linking them like this: <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <script src="https://ajax.googleapis.com/a ...

Ways to detect the use of vue.js on a webpage without relying on vue-devtools

One way to determine if the page is utilizing Angular or AngularJS is by inspecting window.ng and window.angular. Is there a similar method to identify whether Vue is being used on the page directly from the console, without relying on vue-devtools? ...

Ways to reset a JQuery/JavaScript filter

I am currently working on a list of div items that are being filtered and sorted using JavaScript. Each item animates as it enters the screen, scaling up to its final size. However, when I apply filters using buttons, items that are already displayed do n ...

Exploring Vue and Webpack's tree shaking functionality, side effects management, and its impact on CSS: Loading unused component CSS

We are currently grappling with the challenge of effectively implementing tree shaking for CSS within Vue Single File Components using Webpack. Within our package.json file, we have specified: "sideEffects": ["*.css", "*.less","*.vue"], which appears to b ...

Show two <p>'s next to each other

I am trying to arrange 2 paragraphs side by side. <p class = "firstClass">This is the first paragraph.</p> <p class = "secondClass">This is the second paragraph.</p> Result: This is the first paragraph. This is the second paragra ...

Ensuring Consistent Headings While Scrolling

Imagine having headings structured like this: <h1 class="fixontop">heading 1</h1> content goes here. . . . long paragraph. <h1 class="fixontop">heading 2</h1> 2nd content goes here. . . . long paragraph. <h1 class="fixontop"> ...

Is there a way to change the border property of an element when clicked, without causing the displacement of other elements?

I'm in the process of creating a webpage where users can choose the color and storage capacity of an item. Only one color/capacity can be selected at a time, and once chosen, it should be highlighted with a border. The issue I encountered is that whe ...

What could be causing the video to extend beyond the limits of the container?

When extending the result window, the video ends up overlapping the section below it. I am looking to keep the video within the confines of the section's height, which is set to height:100vh. Is there a way to accomplish this? Check out this jsFiddl ...

A guide on implementing multiple ternary operators in a Vue.js template

Is it possible for a template to return three different values instead of just two, based on the data? I am familiar with using two conditions, but is there a way to use more than two without getting a syntax error? <option {{ change === 1 ? &apos ...

Is it possible to use AJAX to change the class name of a Font Awesome icon?

I am considering updating the icon after deleting a row. Should I initially include the font awesome icon once in the blade, then remove the class name and add it back with ajax? blade: <div id="status-{{ $country->id }}"> <div id ...

XML powered jQuery menu

Admittedly, I have not yet used XML with jQuery. Below is a snippet of the XML: <folder title="Home"> <item title="Welcome" /> <folder title="My Photos"> <folder title="Holiday"> <item title="Photo 1" /> ...

Concealed checkbox value in jQuery

I have a problem with setting the hidden checkbox "marketingPhone" to TRUE when the "marketingAAA" checkbox is checked as true. This part works fine. However, if any other checkbox on the page is set to TRUE, then it also sets "marketingPhone" to TRUE. I ...

Issue with ng-repeat causing HTML table data to not appear

Trying to create a Flask web app, I encountered an issue while attempting to display tabular data on my webpage using AngularJS. Despite using ng-repeat to iterate through the data, it doesn't seem to work and no errors appear in the console. Can anyo ...

Enhancing Bootstrap project with personalized CSS styling

Utilizing SCSS to create my CSS has been the approach I've taken. The content of my main.scss file remains consistent even after it is compiled into css. .my-custom-row { background-color: bisque; } Contained within my index.html file is everythi ...

The buttons are not resizing to fit the entire table cell

I'm currently working with Bootstrap 4 and trying to place buttons in a table cell for each row. However, the buttons are not expanding to fill the available space and appear squished. This issue persists even when I switch to mobile view. From the p ...

Using Javascript and jQuery, populate a dropdown menu with options that are extracted from a different dropdown menu

These are my two <select> elements: <select class="js-select-1"> <option disabled>Starting point</option> <option>A</option> <option>B</option> <option>C</option> <option>D</op ...

Adding an external JavaScript file to an HTML document by importing an array

Having trouble loading an array from an external JS file into my HTML. Snippet from js.js: var temp_max = [4,9,2,5,8,4,2,10]; In the HTML: Note: Be sure to download DateJS and place it in "DATE-JS"!! <!doctype html> <html> ... (HTML c ...

Why is there an excessive amount of white space on my Reactjs page?

This webpage (page URL -) displays well without any white space between two images when viewed on a laptop. However, when accessed on a mobile device, it appears to be taking up too much space as shown in the image below. Image of webpage on laptop- lapto ...

Rotating and scaling an image simultaneously using CSS3

I am feeling very puzzled. Why am I unable to simultaneously scale and rotate? Despite my attempts, it seems to be not working: .rotate-img{ -webkit-transform:scale(2,2); -webkit-transform:rotate(90deg); margin-left:20%; margin-top:10%; } ...

IFrame displaying blank page instead of report

The following code snippet displays a report within an IFrame: HTML <div id="dialogReport"> <div> <iframe id="reportFrame" style="width: 800px; height: 600px; border: 2px solid black; margin: 10px auto;"> </iframe> </di ...