WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Preserve inline styling in table cell

[Resolved] Preserve inline styling in table cell

  • I would like to create a version of this table
    http://www.pagepipe.com/www3/
    with an extra column, which would show the color specified in the fourth column by specifying that color as the background color for the cell in the fifth column.

    I can do this easily with a static table. But the reason I want to use TablePress for it is so I could search for a certain color, then sort by the “Theme” (first column) to see that color in context with the others in its theme.

    I was able to successfully import the table file, but TablePress seems to strip out the inline CSS, which is the only efficient way I’ve come up with to accomplish my aim. Can you suggest a way to preserve it?

    The format of one of the cells in question is
    <td style="background-color:#474747;">&nbsp;</td>

    Thank you!

    http://wordpress.org/extend/plugins/tablepress/

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

    @tobiasbg

    Hi,

    thanks for your question.

    You are right, the import process strips such inline CSS. The reason for that is that TablePress only imports the table data in the cells.

    Now, instead of changing the background color of the cell, I’d like to suggest a similar method, that you can find in this thread: http://wordpress.org/support/topic/custom-background-color

    Basically you would add a colored square (via a <div> HTML element) into the cell, with

    <div style="background-color:#ff0000; height:20px;"></div>

    Regards,
    Tobias

    DIVs to the rescue! Thank you, worked perfectly.

    Plugin Author TobiasBg

    @tobiasbg

    Hi,

    very nice! Thanks for the confirmation!

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Preserve inline styling in table cell’ is closed to new replies.