Forums

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

Home Forums CSS Style the next selector, if (current selector child has class)

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #204077
    Slake
    Participant

    Hi,

    I’m trying the following in pure css:

    if (li > a.current) + li {
    color:red;
    }

    https://jsfiddle.net/Ld0Luvra/2/

    Thanks for your help.

    #204079
    Slake
    Participant

    Sure, so :
    . I have a few page links.
    . The current page link is marked with a current class.
    . And i want to color in red, the link after the current one. (So the next link).

    But the links are encapsulated, as you can see on jsfiddle with a <li> around <a>.

    Is it more understandable ?

    #204081
    Slake
    Participant

    I also think it’s impossible, but as a friend told me the opposite; I wanted to check with the CSS experts :)

    #204084
    Slake
    Participant

    You were not the first one asking for more informations, so maybe not that easy to get. :)

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