WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] Preserve inline styling in table cell (4 posts)

  1. pictureitsolved
    Member
    Posted 1 year ago #

    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/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    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

  3. pictureitsolved
    Member
    Posted 1 year ago #

    DIVs to the rescue! Thank you, worked perfectly.

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    very nice! Thanks for the confirmation!

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.