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

Home Forums CSS CSS Question

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #46173


    my second through to fourth-child is not picking up color difference


    the pseudo selectors you can use based on position are

    :nth-child(number) //nth-child(2) for the second :nth-child(2n) for even childs 0,2,4

    your code should look like this

    .breadcrumb a:first-child {
    color: black;
    .breadcrumb a:nth-child(2) {
    color: orange;
    .breadcrumb a:nth-child(3) {
    color: red;
    .breadcrumb a:last-child {
    color: yellow;


    Ok Will give it a go just teaching my self more on those things now makes life easier.

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