• Resolved steve-x

    (@steve-x)


    Is it possible to get a unique id for the table. Would be really great to write speciell css for every table! or is there an other way to style each table different?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Roch

    (@rochesterj)

    Hi!

    Thanks for your message!

    Each one is different, but we could help you targeting them. Would you mind pasting the link to your website here, so we can check it out?

    Kind Regards,
    -Roch

    Thread Starter steve-x

    (@steve-x)

    https://www.futsal-blog.at/
    I have this four league tables also on other sites and I would like to style them with css.

    Roch

    (@rochesterj)

    Hi!

    Do you know how to use firebug? Or Chrome developer tools?

    Because this will help you a lot in this case as we can’t provide so many different items.

    What you can do is:
    1) Inspect the element and get its ID
    2) If the CSS affects other pages, check the body tag, WP adds some classes for them that are unique, for example .home in your homepage .page-ID for pages and so on
    3) If you have 2 items with the same ID in the same page (it isn’t ideal, but it happens) use the :nth-child selector to get just the first or second or third one

    I hope this helps!

    Kind Regards,
    -Roch

    Thread Starter steve-x

    (@steve-x)

    Thx for the hint! Works well.

    But I think it would be much easier to have a Special id for the table itself. So I can define a css for the table and it doesn’t matter where I would include it. Maybe for the next Version?!

    my Code now for example:
    body.page-id-6860 tr.sp-row-no-0 td { Color: #000; }

    Roch

    (@rochesterj)

    Hi!

    This would be quite hard as we don’t have any CPT or data to generate a unique ID for each table. For example when you create an event, surely we have an ID for it but when you create a table you are actually just loading content so there is not content created for it (and therefore no ID – in fact add an ID there would decrease the performance as a new “unnecessary” query will be performed)

    Kind Regards,
    -Roch

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘unique table id’ is closed to new replies.