FANDOM


  • I'm trying to alter the color of the rows to be like this one, for a specific theme only. I tried this, but it doesn't seem to work the way I want it.

    div.pi-item:nth-child(odd) {
        background-color: #EFE6BA;
    }
     
    div.pi-item:nth-child(even) {
        background-color: #E3DAB0;
    }
    
      Loading editor
    • That should work. Can you provide a link to an example use of the template where it isn't working?

        Loading editor
    • Here's what it looks, but I actually want the gray part to be the alternating colored.

        Loading editor
    • it's .portable-infobox .pi-data-label. you can use browser inspector to see classes and rules.

        Loading editor
    • how to get and/or use browser inspector?

        Loading editor
    • Depends on your browser. Generally pressing F12, Ctrl+Shift+I, or right-clicking the page and selecting "Inspect" will open the browser console

        Loading editor
    • I'm not sure on what to do find in the classes and rules, also is there a way to make the data-label in the infobox have an alternate color pattern? 

        Loading editor
    • Yes, add the "nth-child()" selector you were using before.

      .portable-infobox.pi-theme-<theme value> .pi-data-label:nth-child(odd) {
          background-color: #EFE6BA;
      }
       
      .portable-infobox.pi-theme-<theme value> .pi-data-label:nth-child(even) {
          background-color: #E3DAB0;
      }
        Loading editor
    • It still doesn't seem to be working, here's an example with the theme . Maybe it's something in the css here .

        Loading editor
    • there is only 1 lable in the pi-item. so:

      .portable-infobox.pi-theme-Kitaro .pi-data:nth-child(odd) .pi-data-label
      

      same for even.

        Loading editor
    • It finally works!! thanks!!

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.