renderTable column width & CSS (take 2)



Giving this another shot with a more streamlined example that really demonstrates the problems I'm having. I'm using the following bits of code for the...
css definition:

tags$head(tags$style(HTML('#Tall_ABG table {border-collapse:collapse;}
#Tall_ABG table td {width: 5px; padding:0px;}
#Tall_ABG table th {
  height: 150px;
  transform: rotate(290deg) translate(-140px, -75px);
  transform-origin: top left;
  white-space: nowrap;
  width: 30px;}'

and renderTable:

output$Tall_ABG <- renderTable({
      criteria.list = list(Sample_Source = 'URINE',  Species = input$Species),
      other.thresh = input$MIN_COUNT, = 'SUSC',
      lexicon =$pathogen_dict,
      Abxs = input$Drugs
    type = "html",
    digits = 0,
    rownames = TRUE

Which produces the following output:

The problem should be apparent: Despite defining fixed column widths in both td and th sections and rotating the column headers, the width of the columns is being defined by the length of the column header. This renders the table practically illegible.

I hate to beat a dead horse, but after this revision the issue is worse. Following my previous post I decided to transpose the table in hopes of solving the problem, but now the column headers of different lengths make the underlying source of the problem even more obvious.

Again, thank you in advance for any help.

Addendum: I'm aiming for something similar to whats been done here, but despite multiple attempts I've been unable to implement the code they present.

Controlling renderTable column width
closed #2

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.