• Resolved confusedkoala

    (@confusedkoala)


    Hi

    I am trying to highlight all 1s as red and all 2s as green.

    How do I exactly do it and where? I don’t know span etc ,

    Thanks

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Thread Starter confusedkoala

    (@confusedkoala)

    Thank you.

    Currently it looks terrible on my mobile ?? the columns are too squeezed and rows too big.

    As you can see there are 1s and 2s.

    I hope to colour the cells. Kind of like a heat map. Thanks.

    Link in first post.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for the explanation!

    To make this table look better, please add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress {
    	word-break: normal;
    	word-wrap: normal;
    	table-layout: auto;
    }
    .tablepress td {
    	padding: 8px !important;
    	line-height: normal;
    }
    .tablepress th {
    	padding: 8px 20px 8px 8px !important;
    	line-height: normal;
    }
    
    .tablepress-id-1 .column-1 {
    	white-space: nowrap;
    }

    To highlight the 1s and 2s, you could write them as <span class="number-1">1</span> and <span class="number-2">2</span> in the table. Then, you could use CSS like

    .tablepress-id-1 .number-1 {
      color: #ff0000;
    }
    .tablepress-id-1 .number-2 {
      color: #00ff00;
    }

    to change their colors.

    Regards,
    Tobias

    Thread Starter confusedkoala

    (@confusedkoala)

    Thank u .. what do you mean add it in the table? Do I add it in the WordPress text editor? ( apologies. Not very good in wp )

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    you need to add it into the cells where you have the numbers.

    Regards,
    Tobias

    Thread Starter confusedkoala

    (@confusedkoala)

    ah ok .. so you mean I have to manually add? is there a way I can highlight instead? ( like in excel where you drag select the cells and fill with colour )

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, you would have to add it manually. The other possibility would be to use CSS code, as explained on https://tablepress.org/faq/change-background-color-of-a-row/
    Highlighting by dragging is not possible, sorry.

    Regards,
    Tobias

    Thread Starter confusedkoala

    (@confusedkoala)

    Thank you ??

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    sure, no problem! ??

    Best wishes,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Highlight cells full steps’ is closed to new replies.