Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Purpose

By default, Reporting tables do not expand to the full width of the browser.  We can apply a CSS style which only adjusts the width of Reporting tables, while regular Confluence tables remain the same. 

...

Answer

...

  1. Go to Space Tools > Look and Feel > StyleSheet

  2. Apply the following CSS

    Code Block
    .aTable {
      border: 1px solid #ccc;
      border-collapse: collapse;
      width: 100%;
      table-layout: fixed;
    }
    
    .aTable tr:nth-child(even)
    {background-color: #f2f2f2}
    
    .aTable tr:nth-child(odd)
    {background-color: white}
  3. Go to the report-table macro and apply the CSS class (in this scenario, the CSS class is aTable 

  4. Save the settings and then Publish the page

...