• Resolved hutchie91

    (@hutchie91)


    Apologies if this has already been asked, but I couldn’t find it.

    I’m wondering how I can go about styling single rows of the player lists, in the same way I can for league tables. In short, leagues tables are given a class of .sp-row-no-#, where # increments for each row. This enables me to style rows individually, to highlight the leader, as can be seen on the link.

    I want to do this for player lists too, but the class isn’t output for player lists. Is this something which is likely to be added, or is there a work around available?

    The page I need help with: [log in to see the link]

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

    (@rochesterj)

    Hi!

    Thanks for reaching out!

    We can do that with pseudo elements. Add the following code in your custom css field ( Wp admin > SportsPress > Settings > General > Custom CSS ) and let us know how it works:

    .sp-player-list tr:nth-child(1) {
    	background: red;
    }

    Thanks!

    Roch

    (@rochesterj)

    Oh, I forgot to mention, you can use IDs to target specific player lists, and you can copy/paste that code to change other rows (2nd, 3rd..)

    Thanks!

    Thread Starter hutchie91

    (@hutchie91)

    That worked an absolute treat, thank you kindly

    Roch

    (@rochesterj)

    You’re most welcome!

    Let us know if you need anything else.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Player List Styling’ is closed to new replies.