• Resolved wordpress_quest

    (@wordpress_quest)


    Say you have a table like this:

    Person1
    age     age1
    height  height1
    name    name1
    Person2
    age     age2
    height  height2
    name    name2

    How can I not only get the first row to be a table head (this is easy to do within the plugin), but also the 4th row (Person2).

    One difficulty: the position (row nr) of this row can vary (could later be the 5th instead of the 4th), because I add rows to the table, so I cannot use a css class specific for this rownumber… (also I would like it to work over all tables, and not add a specific css class for each and every table).

    Anyone? ??

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

    (@tobiasbg)

    Hi,

    this is not possible unfortunately.

    The primary reason is that HTML does not support several theads in a table. The browsers can only work with one table head and that is displayed at the top (that also makes sense, as you are actually having two tables here, but want to show them as one).

    Now, you might “fake” the table head, in terms of styling a row so that it looks like the head with some CSS code. That is not too hard to do. Unfortunately it will be completely dependant on the number of the row, which means that your other requirement can unfortunately not be fulfilled by the plugin.

    So, in my opinion, you should create one table for each person, as you can then have a table head for each one and the growing of the tables won’t harm. Of course that needs a few more clicks when working with the data, but it is the only solution I see to achieve the styling you want.

    Best wishes,
    Tobias

    Thread Starter wordpress_quest

    (@wordpress_quest)

    Ah ok, too bad. Thanks for your answer. Because I really do want everything in one table I decided to create one separate ‘highlight’ class in my theme’s css:

    .table_highlight {
        width: 300px;
        margin: 0 auto;
        font-weight: bold;
        background-color: #FFFFE0;
        border-top: 1px solid #E6DA55;
        border-bottom: 1px solid #E6DA55;
        text-align: center;
    }

    …and apply that directly to the content of the cell when creating the table (by <div class=’table_highlight’>cell content</div> ). Works almost perfect ?? In fact, if I would remove the standard padding on table cells I probably could make it display exactly as the header.

    Anyway, thanks again for thinking with me!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP-Table Reloaded] wp table reloaded make one row an intermediate table head th’ is closed to new replies.