How can I change the size of dropdown menu (select tags) smaller? I thought it is the padding that makes the dropdown looking \'thick\'. So I change the padding to 0 to make
For the dropdown options, it's line-height
that you want (the padding is already 0 by default I think, look at the CSS on it using the chrome debugger).
For the box itself, it looks like bootstrap is placing a min-height
on it, so you also need to add min-height: 0;
. Again, I just figured this out right now with the debugger by looking at its CSS.
So here's a working solution:
runApp(shinyApp(
ui = fluidPage(
tags$style(type='text/css', ".selectize-input { padding: 2px; min-height: 0;} .selectize-dropdown { line-height: 10px; }"),
selectInput("test","Test", 1:5)
),
server = function(input, output, session) {
}
))
Please try to post complete code samples rather than a snippet of code that we have to complete ourselves. Makes it easier and faster for us to try to answer