Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to style subsequent siblings

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #190855
    arikira
    Participant

    I’d like subsequent siblings in a list to be a shade or two lighter than the first. I am having some difficulty understanding how to accomplish this using the sibling selector. Of course I could go in and style each one individually, but I’d love to implement something more elegant. Any ideas or tips would be much appreciated!

    #190858
    Paulie_D
    Member

    You can’t do this automatically with Pure CSS.

    CSS can’t do “10% lighter than the previous item#s color/background”.

    Of course I could go in and style each one individually

    This is basically what you have to do. A pre-processor can semi-automate this but, in the end, this is what happens.

    #190872
    Paulie_D
    Member

    Ah…I’d misunderstood the request…I though each subsequent sibling was to be lighter than the previous one.

    If so, then my previous comments apply. Otherwise traq‘s suggestion is the right one.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.