2

i want to algin it left side in header,i had shared a screen shot here

//ui.r

    library(RJDBC)
    library(dplyr)
    library(shiny)
    library(ggplot2)
    library(scales)
    library(shinydashboard)
    library(gridExtra)
    library(DT)
    library(reshape2)
    library(ggthemes)
    library(plotly)

dashboardPage(

  dashboardHeader( 

    tags$li(class = "dropdown",
       navbarPage("header",tabPanel("Plots",style = "align:right;"), tabPanel("Plot1"), tabPanel("Plot2"), tabPanel("Plot3"), tabPanel("Plot4")))

  ),


  dashboardSidebar(


    sidebarMenuOutput(outputId = "sidebar"),
    uiOutput("sidebarmenu")
  ), 
  dashboardBody(


    uiOutput("body"),
    uiOutput("tabbox"),

    uiOutput("dashboardbody")



  )

)
Mike H.
  • 13,960
  • 2
  • 29
  • 39
ROHIT JHA
  • 33
  • 4

2 Answers2

1

In addition to answer given by ROHIT JHA we can do it adding the following two css tags in the dashboardBody.

tags$head(tags$style(".main-header .navbar{ margin-left: 0px !important;}")),
tags$head(tags$style(".navbar-custom-menu, .main-header .navbar-right {float: left !important;}")),

On adding this you get something that looks like this:

enter image description here

SBista
  • 7,479
  • 1
  • 27
  • 58
0

we can do something like this

CustomHeader <- dashboardHeader(title="Store Analytics")
    CustomHeader$children[[3]]$children <- list(
      div(style="float:left;height:55px",uiOutput("try")))

    dashboardPage(

      CustomHeader,
)
ROHIT JHA
  • 33
  • 4