• Resolved ivoyages

    (@ivoyages)


    Hello,

    I search to personnalize cell in many tables with 4 backgound colors.

    1) I personnalized the css like this :

    .tablepress-id-2 .row-2 .column-1 {
    background-color: #ff0000;
    }

    .tablepress-id-2 .row-2 .column-2 {
    background-color: #ff9900;
    }

    .tablepress-id-2 .row-2 .column-4 {
    background-color: #ffcc00;
    }

    .tablepress-id-2 .row-2 .column-6 {
    background-color: #349800;
    }

    Color is good in specific cell

    3) Single Cell Shortcode Content

    After installation and activation

    I had insert the following shortcodes :

    [table-cell id=2 row=2 column=1 /]
    [table-cell id=2 row=2 column=2 /]
    [table-cell id=2 row=2 column=4 /]
    [table-cell id=2 row=2 column=6 /]

    But nothing happen. Something is wrong ?

    Thanks in advance to help me.

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The Single Cell Extension has no relation to the table or the CSS. It will retrieve only the content from inside the cell, but no styling. You can style it by adding HTML code around the Shortcode.

    Regards,
    Tobias

    Thread Starter ivoyages

    (@ivoyages)

    Hi Tobias,

    Thanks for your quicly answer. Can you give me an example because I’m not sure to understand

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    you would have to use HTML like
    <span class="tablepress-cell-content">[table-cell id=2 row=2 column=1 /]</span>
    and CSS like

    .tablepress-cell-content {
      color: #ff0000;
    }
    

    Regards,
    Tobias

    Thread Starter ivoyages

    (@ivoyages)

    Thanks for your proposition but it doescn’t work.

    I have nothing in the cell.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, then I’m confused. If you have nothing in the cell, what are you using the Single Cell Shortcode Extension for?

    Regards,
    Tobias

    Thread Starter ivoyages

    (@ivoyages)

    Yes, TablePress Extension: Single Cell Content Shortcode. And the extension is active.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, I know that you are using it. But why? What are you trying to do with it?

    Regards,
    Tobias

    Thread Starter ivoyages

    (@ivoyages)

    I would like to use 4 background colors (red, orange, yellow, green) for many table. And I search the most easy solution for that

    • This reply was modified 8 years, 2 months ago by ivoyages.
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, then you will only need the CSS. The Single Cell Shortcode Extension is not necessary.
    You would simply use a Shortcode like
    [table id=2 /]
    to show your table with the background colors.

    Regards,
    Tobias

    Thread Starter ivoyages

    (@ivoyages)

    Yes but in the same table, I have many cell with the 4 background colors

    Typically, its to explain easily what is the best season to visit a place

    For example :

    J : red
    F : orange
    M : yellow
    A : yellow
    M : green
    J : green
    J : green
    A : green
    S : yellow
    O : yellow
    N : orange
    D : red

    If I change the place, the 4 background cell will change for the months.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, that’s correct. You might instead want to try this approach with another TablePress Extension: https://www.ads-software.com/support/topic/highlight-a-row-based-on-value/?replies=16

    Regards,
    Tobias

    Thread Starter ivoyages

    (@ivoyages)

    Thanks I try.

    Thread Starter ivoyages

    (@ivoyages)

    Hi Tobia,

    very sorry but I can not.

    I had on css :

    .tablepress .row-highlight-red td {
    	background-color: #ff0000 !important;
    }
    
    .tablepress .row-highlight-orange td {
    	background-color: #ff9900 !important;
    }
    
    .tablepress .row-highlight-yellow td{
    	background-color: #ffcc00 !important;
    }
    
    .tablepress .row-highlight-green td {
    	background-color: #349800 !important;
    }

    and on cell

    [table row_highlight="green" /]
    [table row_highlight="red" /]
    [table row_highlight="yellow" /]
    [table row_highlight="orange" /]

    but nothing happen.

    And if I use [table id=2 row_highlight="red" /] I can’t charge the page.

    Where is my mistake ?

    Grégory

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    I still don’t understand. Why do you have [table row_highlight="green" /] etc. in the cells? You should put your regular content there, not another Shortcode.

    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 ivoyages

    (@ivoyages)

    Hi Tobias,

    I still don’t understand. Why do you have [table row_highlight=”green” /] etc. in the cells? You should put your regular content there, not another Shortcode.

    In cells, I just want one one of the 4 background colors. So I have to configure in the css 4 calls.

    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!

    My website is under construction. You can’t see it on web. But I can give you an administration access in PM

    greg

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Background cellule’ is closed to new replies.