This article explains how to highlight a single cell with different colors created using Advanced Tables when the mouse hovers over the cell.To achieve this specify the CSS Stylesheet in Spacedifferent tables' cells with distinct colors while hovering the respective cells using Advanced Tables for Confluence. This article suggests using the CSS Stylesheet that exists in the Confluence Space Administrator section apart from Global Stylesheet.
Instructions:
- Log into your Confluence instance as an administrator ensuring you have the space administrator access.
- Navigate to the existing intended page and:
- click
- Insert Advanced Table - Table Plus macro. For example, create a table as shown below:
Edit the macro on the Advanced Tables Editor-Table Plusscreen, under Column settings and add the Column attributes as below.
Note: The table class should respective table macro editor by adding the Column attributes values in the Column settings tab as shown below:Note The table class must be different for each table.
Sales Statistics table:Code Block class=confluenceTd cellhover
Product details:
Code Block theme Midnight class=confluenceTd cellhover1
Data:
Code Block class=confluenceTd cellhover3
- Go to Space Tools Tools > Look and click Look and Feel.
Under Stylesheet tab, enter Enter the CSS code and click in the Stylesheet tab and click Save.
Find the CSS code below:Code Block theme Midnight td.cellhover:hover { background-color: lightblue; } td.cellhover1:hover { background-color: red; } td.cellhover3:hover { background-color: green; }
- Open the respective confluence page , and hover the mouse over a cellthe cells in different tables. Notice that cells from different tables are highlighted in different colors.